Skip to content

Commit

Permalink
fix: change to assert_ne macro
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaisqls committed Apr 6, 2024
1 parent ff17111 commit 019a05b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/encode/pprof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl PProfBuilder {
if let Some(v) = v {
return *v;
}
assert!(self.strings.len() != self.profile.string_table.len() + 1);
assert_ne!(self.strings.len(), self.profile.string_table.len() + 1);
let id: i64 = self.strings.len() as i64;
self.strings.insert(s.to_owned(), id);
self.profile.string_table.push(s.to_owned());
Expand All @@ -42,7 +42,7 @@ impl PProfBuilder {
if let Some(v) = v {
return *v;
}
assert!(self.functions.len() != self.profile.function.len() + 1);
assert_ne!(self.functions.len(), self.profile.function.len() + 1);
let id: u64 = self.functions.len() as u64 + 1;
let f = Function {
id,
Expand All @@ -61,7 +61,7 @@ impl PProfBuilder {
if let Some(v) = v {
return *v;
}
assert!(self.locations.len() != self.profile.location.len() + 1);
assert_ne!(self.locations.len(), self.profile.location.len() + 1);
let id: u64 = self.locations.len() as u64 + 1;
let l = Location {
id,
Expand Down

0 comments on commit 019a05b

Please sign in to comment.