Skip to content

Commit

Permalink
Fix warning messages order when using todo!() macro (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
alopatindev committed Dec 14, 2023
1 parent 1ab139e commit 496dbb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ impl FilteredAndOrderedMessages {
.map(|i| {
let spans_from_leaf_to_root = i.message.spans.iter().rev();
let key = spans_from_leaf_to_root
.filter(|span| Path::new(&span.file_name).is_relative())
.map(|span| (span.file_name.clone(), span.line_start))
.collect::<Vec<_>>();
(key, i)
Expand Down Expand Up @@ -301,9 +302,7 @@ impl TransformedMessages {
let mut project_span = span.clone();
while let Some(expansion) = span.expansion {
span = expansion.span;
if Path::new(&span.file_name).is_relative() {
project_span = span.clone();
}
project_span = span.clone();
}
project_span
}
Expand Down

0 comments on commit 496dbb2

Please sign in to comment.