Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
DSharifi committed Jan 16, 2025
1 parent 77f3766 commit e8756bd
Show file tree
Hide file tree
Showing 8 changed files with 613 additions and 541 deletions.
1,139 changes: 607 additions & 532 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rs/crypto/internal/crypto_lib/bls12_381/type/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ macro_rules! define_affine_and_projective_types {
const WINDOW_MASK: u8 = (1 << Self::WINDOW_BITS) - 1;

// The total number of windows in a scalar
const WINDOWS : usize = (Self::SUBGROUP_BITS + Self::WINDOW_BITS - 1) / Self::WINDOW_BITS;
const WINDOWS : usize = Self::SUBGROUP_BITS.div_ceil(define_affine_and_projective_types!(G1Affine, G1Projective, 48));

// We must select from 2^WINDOW_BITS elements in each table
// group. However one element of the table group is always the
Expand Down
2 changes: 1 addition & 1 deletion rs/protobuf/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ProxyDecodeError {
T: Error + Eq + 'static,
{
self.source()
.map_or(false, |err| err.downcast_ref() == Some(&other_err))
.is_some_and(false, |err| err.downcast_ref() == Some(&other_err))
}
}

Expand Down
2 changes: 1 addition & 1 deletion rs/rust_canisters/dfn_candid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<A1: DeserializeOwned + CandidType + HasCandidDecoderConfig> FromWire
/// this is a private mirror of the type in dfn_core::api which generates the
/// serialization/deserialization for it without putting a dependency on candid
/// in dfn_core
///
/// This is a bit of a weird type witness. Candid is multi arity in both inputs
/// and outputs the outputs don't fit in well with rust. To make writing candid
/// nicer we assume that every function is going to try and return one value, if
Expand Down
1 change: 0 additions & 1 deletion rs/rust_canisters/dfn_core/src/stable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const PAGE_SIZE: f64 = 64.0 * 1024.0;
/// +--------+-----------------+-------->
/// | length | content | junk
/// +--------+-----------------+-------->
const LENGTH_BYTES: u32 = 4;

pub fn stable64_size() -> u64 {
Expand Down
6 changes: 3 additions & 3 deletions rs/types/types/src/consensus/idkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ impl IDkgPayload {
}

/// Return an iterator of all ids of pre-signatures for the given key in the payload.
pub fn iter_pre_signature_ids<'a>(
&'a self,
pub fn iter_pre_signature_ids(
&self,
key_id: &'a IDkgMasterPublicKeyId,
) -> impl Iterator<Item = PreSigId> + '_ {
) -> impl Iterator<Item = PreSigId> {
let available_pre_signature_ids = self
.available_pre_signatures
.iter()
Expand Down
1 change: 0 additions & 1 deletion rs/utils/validate_eq/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::fmt::Debug;
///
/// Gigantic fields such as PageMaps that are unfeasible to compare in production are meant to
/// be exempted from comparison.
pub trait ValidateEq {
fn validate_eq(&self, rhs: &Self) -> Result<(), String>;
}
Expand Down
1 change: 0 additions & 1 deletion rs/utils/validate_eq_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use syn::Data::Struct;
/// - Ignore ignores the field.
/// - None (default) compares fields using PartialEq and reports their name in case of
/// divergence.
enum ValidateEqFieldAttr {
/// Compare using .eq() and return field name if it diverges.
CompareWithPartialEq,
Expand Down

0 comments on commit e8756bd

Please sign in to comment.