diff --git a/synthesizer/process/src/stack/register_types/initialize.rs b/synthesizer/process/src/stack/register_types/initialize.rs index ba04cd388c..f35a89f8e5 100644 --- a/synthesizer/process/src/stack/register_types/initialize.rs +++ b/synthesizer/process/src/stack/register_types/initialize.rs @@ -186,7 +186,7 @@ impl RegisterTypes { 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))); } } } diff --git a/utilities/src/bytes.rs b/utilities/src/bytes.rs index 82eb310d8a..d49bea08fe 100644 --- a/utilities/src/bytes.rs +++ b/utilities/src/bytes.rs @@ -80,7 +80,7 @@ pub trait FromBytes { } } -pub struct ToBytesSerializer(String, Option, PhantomData); +pub struct ToBytesSerializer(PhantomData); impl ToBytesSerializer { /// Serializes a static-sized object as a byte array (without length encoding). @@ -100,7 +100,7 @@ impl ToBytesSerializer { } } -pub struct FromBytesDeserializer(String, Option, PhantomData); +pub struct FromBytesDeserializer(PhantomData); impl<'de, T: FromBytes> FromBytesDeserializer { /// Deserializes a static-sized byte array (without length encoding). @@ -166,12 +166,12 @@ impl<'de, T: FromBytes> FromBytesDeserializer { } } -pub struct FromBytesVisitor<'a>(&'a mut Vec, SmolStr, Option); +pub struct FromBytesVisitor<'a>(&'a mut Vec, SmolStr); impl<'a> FromBytesVisitor<'a> { /// Initializes a new `FromBytesVisitor` with the given `buffer` and `name`. pub fn new(buffer: &'a mut Vec, name: &str) -> Self { - Self(buffer, SmolStr::new(name), None) + Self(buffer, SmolStr::new(name)) } }