Skip to content

Commit

Permalink
Use .rsplit_once("/src/") instead of .split_once("/src/").
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Apr 21, 2023
1 parent f559a6b commit 7e40255
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl DiagnosticReporter<'_> {
let prefix = match level {
DiagLevel::Bug(location) => {
let location = location.to_string();
let location = match location.split_once("/src/") {
let location = match location.rsplit_once("/src/") {
Some((_path_prefix, intra_src)) => intra_src,
None => &location,
};
Expand Down

0 comments on commit 7e40255

Please sign in to comment.