Skip to content

Commit

Permalink
Merge pull request #80 from miek/clippy-fixes-2023-10-16
Browse files Browse the repository at this point in the history
Clippy fixes
  • Loading branch information
miek authored Oct 16, 2023
2 parents 4b46b6c + 7b23053 commit 2d93357
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,9 @@ impl Transaction {
String::from(""),
(None, Some(outcome)) =>
format!(", {outcome}"),
(Some(size), None) if size == 0 =>
(Some(0), None) =>
String::from(" with no data"),
(Some(size), Some(outcome)) if size == 0 =>
(Some(0), Some(outcome)) =>
format!(" with no data, {outcome}"),
(Some(size), None) => format!(
" with {size} data bytes: {}",
Expand Down
12 changes: 6 additions & 6 deletions src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ pub struct Id<T> {

impl<T> Eq for Id<T> {}

impl<T> PartialOrd for Id<T> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.value.partial_cmp(&other.value)
}
}

impl<T> Ord for Id<T> {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.value.cmp(&other.value)
}
}

impl<T> PartialOrd for Id<T> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}

impl<T> Display for Id<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>)
-> Result<(), std::fmt::Error>
Expand Down

0 comments on commit 2d93357

Please sign in to comment.