undid some clippy changes so that code compiles

This commit is contained in:
Matthew Liu
2023-07-18 17:46:13 -07:00
parent 91a5fe1271
commit f0d0fc68a2
2 changed files with 33 additions and 26 deletions

View File

@@ -196,7 +196,7 @@ mod tests {
#[cfg(feature = "debugger")]
{
let mut group_counter: u64 = 0;
let group_counter: u64 = 0;
let in_1 = fe.add_node(make_node(
Operation::PublicInput(NodeIndex::from(0)),

View File

@@ -1,11 +1,17 @@
use crate::{InnerPlaintext, PrivateKey, SealData};
use crate::{InnerPlaintext, SealData, PrivateKey};
use static_assertions::const_assert;
use sunscreen_compiler_common::{GraphQuery, GraphQueryError};
use sunscreen_fhe_program::{FheProgram, FheProgramTrait, Literal, Operation::*};
#[cfg(feature = "debugger")]
use sunscreen_fhe_program::{SecurityLevel::TC128, SchemeType::Bfv};
#[cfg(feature = "debugger")]
use crate::debugger::sessions::{get_sessions, BfvSession};
#[cfg(feature = "debugger")]
use crate::serialization::WithContext;
use crossbeam::atomic::AtomicCell;
use petgraph::{stable_graph::NodeIndex, Direction};
#[cfg(test)]
@@ -16,10 +22,11 @@ use std::borrow::Cow;
use std::collections::VecDeque;
#[cfg(not(target_arch = "wasm32"))]
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::sync::{Arc};
use seal_fhe::{
Ciphertext, Error as SealError, Evaluator, GaloisKeys, Plaintext, RelinearizationKeys,
SecretKey,
};
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
@@ -608,8 +615,8 @@ where
#[cfg(test)]
mod tests {
use super::*;
use crate::Params;
use super::*;
use seal_fhe::*;
use sunscreen_fhe_program::{FheProgramTrait, SchemeType};
@@ -717,8 +724,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -733,8 +740,8 @@ mod tests {
private_key: &private_key,
session_name: "simple_add".to_owned(),
}),
"empty",
)
"empty",
)
.unwrap()
};
@@ -799,8 +806,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -815,7 +822,7 @@ mod tests {
private_key: &private_key,
session_name: "simple_mul".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};
@@ -882,8 +889,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -898,7 +905,7 @@ mod tests {
private_key: &private_key,
session_name: "can_mul_and_relinearize".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};
@@ -980,8 +987,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -996,7 +1003,7 @@ mod tests {
private_key: &private_key,
session_name: "add_reduction".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};
@@ -1061,8 +1068,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -1077,7 +1084,7 @@ mod tests {
private_key: &private_key,
session_name: "rotate_left".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};
@@ -1147,8 +1154,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
#[cfg(feature = "debugger")]
@@ -1163,7 +1170,7 @@ mod tests {
private_key: &private_key,
session_name: "rotate_right".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};
@@ -1219,8 +1226,8 @@ mod tests {
plain_modulus: 1024,
scheme_type: Bfv,
security_level: TC128
},
data: private_key,
},
data: private_key
});
let output = unsafe {
@@ -1234,7 +1241,7 @@ mod tests {
private_key: &private_key,
session_name: "new_session".to_owned(),
}),
"empty",
"empty"
)
.unwrap()
};