Apply additional lints suggested by cargo clippy

This commit is contained in:
Peter McEvoy 2023-03-14 11:40:07 -04:00
parent a7807fd50f
commit 290b964d11
3 changed files with 13 additions and 1 deletions

View File

@ -428,6 +428,12 @@ impl<T: Copy> Hamt<T> {
}
}
impl<T: Copy> Default for Hamt<T> {
fn default() -> Self {
Self::new()
}
}
impl<T: Copy + Preserve> Preserve for Hamt<T> {
unsafe fn preserve(&mut self, stack: &mut NockStack) {
if stack.in_frame(self.0.buffer) {

View File

@ -218,3 +218,9 @@ impl Newt {
Some(cue(stack, atom))
}
}
impl Default for Newt {
fn default() -> Self {
Self::new()
}
}

View File

@ -370,7 +370,7 @@ impl IndirectAtom {
if index == 0 || *(data.add(index)) != 0 {
break;
}
index = index - 1;
index -= 1;
}
*(self.to_raw_pointer_mut().add(1)) = (index + 1) as u64;
self