Skip to content

Commit

Permalink
Can't compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ycscaly committed Nov 15, 2023
1 parent def8340 commit db841c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ members = [
opt-level = 2

[patch.crates-io]
elliptic-curve = {git = "https://github.com/RustCrypto/traits.git", branch = "elliptic-curve/linear-combination-ext-trait"}
elliptic-curve = {git = "https://github.com/RustCrypto/traits.git"}
7 changes: 3 additions & 4 deletions k256/src/arithmetic/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ use crate::arithmetic::{
scalar::{Scalar, WideScalar},
ProjectivePoint,
};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;

use core::ops::{Mul, MulAssign};
use elliptic_curve::ops::LinearCombinationExt as LinearCombination;
use elliptic_curve::{
Expand Down Expand Up @@ -295,7 +294,7 @@ impl<const N: usize> LinearCombination<[(ProjectivePoint, Scalar); N]> for Proje

#[cfg(feature = "alloc")]
impl LinearCombination<[(ProjectivePoint, Scalar)]> for ProjectivePoint {
fn lincomb_ext(points_and_scalars: &Vec<(ProjectivePoint, Scalar)>) -> Self {
fn lincomb_ext(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self {
let mut tables =
vec![(LookupTable::default(), LookupTable::default()); points_and_scalars.len()];
let mut digits = vec![
Expand All @@ -306,7 +305,7 @@ impl LinearCombination<[(ProjectivePoint, Scalar)]> for ProjectivePoint {
points_and_scalars.len()
];

lincomb(points_and_scalars.as_slice(), &mut tables, &mut digits)
lincomb(points_and_scalars, &mut tables, &mut digits)
}
}

Expand Down

0 comments on commit db841c5

Please sign in to comment.