MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / shared

Method shared

crates/data-structures/src/slim_slice.rs:1065–1069  ·  view source on GitHub ↗
(&'a self)

Source from the content-addressed store, hash-verified

1063 /// Convert this mutable reference to a shared one.
1064 #[inline]
1065 pub fn shared(&'a self) -> &'a SlimSlice<'a, T> {
1066 // SAFETY: By virtue of `&'a mut X -> &'a X` being sound, this is also.
1067 // The types and references to them have the same layout as well.
1068 unsafe { mem::transmute(self) }
1069 }
1070
1071 /// Converts a `&mut [T]` to the limited version without length checking.
1072 ///

Callers 1

derefMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected