(
mc: &Mutation<'gc>,
s: &'static S,
)
| 120 | } |
| 121 | |
| 122 | pub fn from_static<S: ?Sized + AsRef<[u8]>>( |
| 123 | mc: &Mutation<'gc>, |
| 124 | s: &'static S, |
| 125 | ) -> InternedString<'gc> { |
| 126 | InternedString(Gc::new( |
| 127 | mc, |
| 128 | StringInner { |
| 129 | hash: str_hash(s.as_ref()), |
| 130 | buffer: Buffer::Indirect(s.as_ref()), |
| 131 | }, |
| 132 | )) |
| 133 | } |
| 134 | |
| 135 | pub fn from_inner(inner: Gc<'gc, StringInner>) -> Self { |
| 136 | Self(inner) |
nothing calls this directly
no test coverage detected