mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 22:57:59 -05:00
chore(all): fix new lints
This commit is contained in:
@@ -49,6 +49,7 @@ pub trait VersionizeOwned {
|
||||
}
|
||||
|
||||
/// This trait is used as a proxy to be more felxible when deriving Versionize for Vec<T>.
|
||||
///
|
||||
/// This way, we can chose to skip versioning Vec<T> if T is a native types but still versionize in
|
||||
/// a loop if T is a custom type.
|
||||
/// This is used as a workaround for feature(specialization) and to bypass the orphan rule.
|
||||
@@ -154,9 +155,10 @@ impl From<Infallible> for UnversionizeError {
|
||||
}
|
||||
}
|
||||
|
||||
/// This trait means that we can convert from a versioned enum into the target type. This trait
|
||||
/// can only be implemented on Owned/static types, whereas `Versionize` can also be implemented
|
||||
/// on reference types.
|
||||
/// This trait means that we can convert from a versioned enum into the target type.
|
||||
///
|
||||
/// This trait can only be implemented on Owned/static types, whereas `Versionize` can also be
|
||||
/// implemented on reference types.
|
||||
pub trait Unversionize: VersionizeOwned + Sized {
|
||||
/// Creates an object from a versioned enum, and eventually upgrades from previous
|
||||
/// variants.
|
||||
|
||||
@@ -59,9 +59,9 @@ fn test_types() {
|
||||
aligned_box: ABox::new(0, -98765),
|
||||
aligned_vec: AVec::from_slice(0, &[1, 2, 3, 4]),
|
||||
never: (),
|
||||
tuple: (3.14, 2.71),
|
||||
set: HashSet::from_iter([1, 2, 3].into_iter()),
|
||||
map: HashMap::from_iter([('t', true), ('e', false), ('s', true)].into_iter()),
|
||||
tuple: (std::f32::consts::PI, std::f64::consts::E),
|
||||
set: HashSet::from_iter([1, 2, 3]),
|
||||
map: HashMap::from_iter([('t', true), ('e', false), ('s', true)]),
|
||||
};
|
||||
|
||||
let mut ser = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user