Skip to content

Commit

Permalink
clippy: fix new lints
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Apr 8, 2024
1 parent ed20562 commit a9f7ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion synthesizer/process/src/stack/register_types/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl<N: Network> RegisterTypes<N> {
for operand in async_.operands() {
if let Operand::Register(register) = operand {
if let Ok(RegisterType::Future(locator)) = register_types.get_type(stack, register) {
assert!(future_registers.remove(&(register.clone(), locator)));
assert!(future_registers.swap_remove(&(register.clone(), locator)));
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions utilities/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub trait FromBytes {
}
}

pub struct ToBytesSerializer<T: ToBytes>(String, Option<usize>, PhantomData<T>);
pub struct ToBytesSerializer<T: ToBytes>(PhantomData<T>);

impl<T: ToBytes> ToBytesSerializer<T> {
/// Serializes a static-sized object as a byte array (without length encoding).
Expand All @@ -100,7 +100,7 @@ impl<T: ToBytes> ToBytesSerializer<T> {
}
}

pub struct FromBytesDeserializer<T: FromBytes>(String, Option<usize>, PhantomData<T>);
pub struct FromBytesDeserializer<T: FromBytes>(PhantomData<T>);

impl<'de, T: FromBytes> FromBytesDeserializer<T> {
/// Deserializes a static-sized byte array (without length encoding).
Expand Down Expand Up @@ -166,12 +166,12 @@ impl<'de, T: FromBytes> FromBytesDeserializer<T> {
}
}

pub struct FromBytesVisitor<'a>(&'a mut Vec<u8>, SmolStr, Option<usize>);
pub struct FromBytesVisitor<'a>(&'a mut Vec<u8>, SmolStr);

impl<'a> FromBytesVisitor<'a> {
/// Initializes a new `FromBytesVisitor` with the given `buffer` and `name`.
pub fn new(buffer: &'a mut Vec<u8>, name: &str) -> Self {
Self(buffer, SmolStr::new(name), None)
Self(buffer, SmolStr::new(name))
}
}

Expand Down

0 comments on commit a9f7ce4

Please sign in to comment.