Skip to content

Commit

Permalink
Fix insertion to cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
hkctkuy committed Dec 27, 2023
1 parent 36ad312 commit 83d1c6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcasr/src/stacktrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Cluster {
crashlines: Vec<String>,
) -> Self {
let mut unique_crashlines: HashMap<String, usize> = HashMap::new();
for (i, crashline) in crashlines.iter().enumerate().take(crashlines.len()) {
for (i, crashline) in crashlines.iter().enumerate() {
unique_crashlines.insert(crashline.clone(), i);
}
Cluster {
Expand Down Expand Up @@ -147,7 +147,7 @@ impl Cluster {
self.stacktraces.push(stacktrace);
self.diam = None;
self.crashlines
.insert(crashline.to_string(), self.paths.len());
.insert(crashline.to_string(), self.paths.len() - 1);
true
}
/// Get cluster diameter
Expand Down

0 comments on commit 83d1c6e

Please sign in to comment.