Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Rust 1.84 #1519

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ipa-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
# rust:slim-bullseye docker image is available.
# 2. Update the rust version used for draft in
# https://github.com/private-attribution/draft/blob/main/sidecar/ansible/provision.yaml.
rust-version = "1.82.0"
rust-version = "1.84.0"
edition = "2021"
build = "build.rs"

Expand Down
2 changes: 1 addition & 1 deletion ipa-core/src/cli/clientconf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn find_file_with_extension(path: &PathBuf, extension: &str) -> Option<String> {
if path.is_file()
&& path
.extension()
.map_or(false, |ext| ext.to_str().unwrap() == extension)
.is_some_and(|ext| ext.to_str().unwrap() == extension)
{
return Some(path.file_stem().unwrap().to_str().unwrap().to_string());
}
Expand Down
4 changes: 2 additions & 2 deletions ipa-core/src/protocol/basics/mul/dzkp_malicious.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use crate::{
/// back via the error response
/// ## Panics
/// Panics if the mutex is found to be poisoned
pub async fn zkp_multiply<'a, B, F, const N: usize>(
ctx: DZKPUpgradedMaliciousContext<'a, B>,
pub async fn zkp_multiply<B, F, const N: usize>(
ctx: DZKPUpgradedMaliciousContext<'_, B>,
record_id: RecordId,
a: &Replicated<F, N>,
b: &Replicated<F, N>,
Expand Down
4 changes: 2 additions & 2 deletions ipa-core/src/protocol/ipa_prf/oprf_padding/insecure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ mod test {
const CHI2_INV_LB: f64 = 10_686.0;

let mut rng = StdRng::seed_from_u64(seed);
let mut sample = [0_f64; N];
let mut sample = vec![0_f64; N];
let dp = Dp::new(f64::from(epsilon), delta, f64::from(cap)).unwrap();
#[allow(clippy::cast_precision_loss)]
let n = N as f64;
Expand Down Expand Up @@ -433,7 +433,7 @@ mod test {
#[allow(clippy::cast_precision_loss)]
for epsilon in 1..11_u8 {
let mut rng = thread_rng();
let mut sample = [0; N];
let mut sample = vec![0; N];
let dp = DiscreteDp::new(f64::from(epsilon), delta, f64::from(cap)).unwrap();
let n = N as f64;
dp.apply(&mut sample, &mut rng);
Expand Down
4 changes: 2 additions & 2 deletions ipa-core/src/report/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ where
/// # Panics
/// If report length does not fit in `u16`.
pub fn encrypted_len(&self) -> u16 {
let len = EncryptedOprfReport::<BK, TV, TS, &[u8]>::SITE_DOMAIN_OFFSET
+ self.site_domain.as_bytes().len();
let len =
EncryptedOprfReport::<BK, TV, TS, &[u8]>::SITE_DOMAIN_OFFSET + self.site_domain.len();
len.try_into().unwrap()
}

Expand Down
2 changes: 1 addition & 1 deletion ipa-core/src/test_fixture/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ impl<S: ShardingScheme> ShardWorld<S> {
}

/// See `Runner` above.
async fn run_either<'a, C, A, O, H, R>(
async fn run_either<C, A, O, H, R>(
contexts: [C; 3],
span: Span,
input_shares: [A; 3],
Expand Down
Loading