mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-16 18:35:02 +01:00
improve code (some clippy::pedantic lints)
This commit is contained in:
parent
a42cec3075
commit
5699ab190a
7 changed files with 33 additions and 36 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue