diff --git a/framework/base/src/types/io/mod.rs b/framework/base/src/types/io.rs similarity index 100% rename from framework/base/src/types/io/mod.rs rename to framework/base/src/types/io.rs diff --git a/framework/base/src/types/managed/mod.rs b/framework/base/src/types/managed.rs similarity index 100% rename from framework/base/src/types/managed/mod.rs rename to framework/base/src/types/managed.rs diff --git a/framework/base/src/types/managed/wrapped/mod.rs b/framework/base/src/types/managed/wrapped.rs similarity index 96% rename from framework/base/src/types/managed/wrapped/mod.rs rename to framework/base/src/types/managed/wrapped.rs index 5086c3bc26..8e3efa278f 100644 --- a/framework/base/src/types/managed/wrapped/mod.rs +++ b/framework/base/src/types/managed/wrapped.rs @@ -20,8 +20,8 @@ mod managed_vec_item; mod managed_vec_item_nested_tuple; mod managed_vec_item_payload; mod managed_vec_owned_iter; -mod managed_vec_ref; mod managed_vec_ref_iter; +mod managed_vec_ref_mut; pub(crate) mod preloaded_managed_buffer; mod randomness_source; mod token_identifier; @@ -53,8 +53,8 @@ pub use managed_vec_item::{ pub use managed_vec_item_nested_tuple::ManagedVecItemNestedTuple; pub use managed_vec_item_payload::*; pub use managed_vec_owned_iter::ManagedVecOwnedIterator; -pub use managed_vec_ref::ManagedVecRef; pub use managed_vec_ref_iter::ManagedVecRefIterator; +pub use managed_vec_ref_mut::ManagedVecRefMut; pub use randomness_source::RandomnessSource; pub use token_identifier::TokenIdentifier; diff --git a/framework/base/src/types/managed/wrapped/managed_vec.rs b/framework/base/src/types/managed/wrapped/managed_vec.rs index 2fd2d5fa3a..ab93734a06 100644 --- a/framework/base/src/types/managed/wrapped/managed_vec.rs +++ b/framework/base/src/types/managed/wrapped/managed_vec.rs @@ -8,8 +8,8 @@ use crate::{ TopEncodeMultiOutput, TopEncodeOutput, }, types::{ - ManagedBuffer, ManagedBufferNestedDecodeInput, ManagedType, ManagedVecItem, ManagedVecRef, - ManagedVecRefIterator, MultiValueEncoded, MultiValueManagedVec, + ManagedBuffer, ManagedBufferNestedDecodeInput, ManagedType, ManagedVecItem, + ManagedVecRefIterator, ManagedVecRefMut, MultiValueEncoded, MultiValueManagedVec, }, }; use alloc::{format, vec::Vec}; @@ -182,8 +182,8 @@ where } } - pub fn get_mut(&mut self, index: usize) -> ManagedVecRef { - ManagedVecRef::new(self.get_handle(), index) + pub fn get_mut(&mut self, index: usize) -> ManagedVecRefMut { + ManagedVecRefMut::new(self.get_handle(), index) } pub(super) unsafe fn get_unsafe(&self, index: usize) -> T { diff --git a/framework/base/src/types/managed/wrapped/managed_vec_ref.rs b/framework/base/src/types/managed/wrapped/managed_vec_ref_mut.rs similarity index 88% rename from framework/base/src/types/managed/wrapped/managed_vec_ref.rs rename to framework/base/src/types/managed/wrapped/managed_vec_ref_mut.rs index b339d1cdaf..b3ab840fd1 100644 --- a/framework/base/src/types/managed/wrapped/managed_vec_ref.rs +++ b/framework/base/src/types/managed/wrapped/managed_vec_ref_mut.rs @@ -10,7 +10,7 @@ use core::{ use super::{ManagedRef, ManagedRefMut}; -pub struct ManagedVecRef<'a, M, T> +pub struct ManagedVecRefMut<'a, M, T> where M: ManagedTypeApi, T: ManagedVecItem, @@ -22,7 +22,7 @@ where item: ManuallyDrop, } -impl<'a, M, T> ManagedVecRef<'a, M, T> +impl<'a, M, T> ManagedVecRefMut<'a, M, T> where M: ManagedTypeApi, T: ManagedVecItem, @@ -47,7 +47,7 @@ where } } -impl<'a, M, T> Drop for ManagedVecRef<'a, M, T> +impl<'a, M, T> Drop for ManagedVecRefMut<'a, M, T> where M: ManagedTypeApi, T: ManagedVecItem, @@ -63,7 +63,7 @@ where } } -impl<'a, M, T> Deref for ManagedVecRef<'a, M, T> +impl<'a, M, T> Deref for ManagedVecRefMut<'a, M, T> where M: ManagedTypeApi, T: ManagedVecItem, @@ -75,7 +75,7 @@ where } } -impl<'a, M, T> DerefMut for ManagedVecRef<'a, M, T> +impl<'a, M, T> DerefMut for ManagedVecRefMut<'a, M, T> where M: ManagedTypeApi, T: ManagedVecItem, diff --git a/framework/base/src/types/static_buffer/mod.rs b/framework/base/src/types/static_buffer.rs similarity index 100% rename from framework/base/src/types/static_buffer/mod.rs rename to framework/base/src/types/static_buffer.rs