improve code (some clippy::pedantic lints)

This commit is contained in:
nora 2022-01-04 22:01:55 +01:00
parent a42cec3075
commit 5699ab190a
7 changed files with 33 additions and 36 deletions

View file

@ -156,7 +156,7 @@ impl Drop for RtAlloc {
for str in &self.symbols {
let raw = str.0.as_ptr();
// SAFETY: No one has free these, see `Gc<T>`
let _ = unsafe { Box::from_raw(raw) };
drop(unsafe { Box::from_raw(raw) });
}
}
}
@ -171,7 +171,7 @@ impl Symbol {
}
pub fn as_str(&self) -> &str {
self.gc.deref()
&*self.gc
}
}