Skip to content

Commit

Permalink
Clippy cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaum committed Feb 23, 2025
1 parent f315e53 commit 7084cf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions crates/common/src/model/defset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl<T: AsByteBuffer + Clone + HasUuid + Named> Defs<T> {
v.with_byte_buffer(|bytes| {
let len = bytes.len() as u32;
buf.extend_from_slice(&len.to_le_bytes());
buf.extend_from_slice(&bytes);
buf.extend_from_slice(bytes);
})
.expect("Failed to encode item");
}
Expand All @@ -196,7 +196,7 @@ impl<T: AsByteBuffer + Clone + HasUuid + Named> Defs<T> {
v.with_byte_buffer(|bytes| {
let len = bytes.len() as u32;
buf.extend_from_slice(&len.to_le_bytes());
buf.extend_from_slice(&bytes);
buf.extend_from_slice(bytes);
})
.expect("Failed to encode item");
}
Expand All @@ -209,7 +209,7 @@ impl<T: AsByteBuffer + Clone + HasUuid + Named> Defs<T> {
v.with_byte_buffer(|bytes| {
let len = bytes.len() as u32;
buf.extend_from_slice(&len.to_le_bytes());
buf.extend_from_slice(&bytes);
buf.extend_from_slice(bytes);
})
.expect("Failed to encode item");
Self::from_bytes(ByteView::from(buf)).unwrap()
Expand All @@ -220,7 +220,7 @@ impl<T: AsByteBuffer + Clone + HasUuid + Named> Defs<T> {
i.with_byte_buffer(|bytes| {
let len = bytes.len() as u32;
buf.extend_from_slice(&len.to_le_bytes());
buf.extend_from_slice(&bytes);
buf.extend_from_slice(bytes);
})
.expect("Failed to encode item");
}
Expand Down
4 changes: 1 addition & 3 deletions crates/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ pub struct ObjAndUUIDHolder {

impl PartialOrd for ObjAndUUIDHolder {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.uuid
.partial_cmp(&other.uuid)
.or_else(|| self.obj.partial_cmp(&other.obj))
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit 7084cf9

Please sign in to comment.