Skip to content

Commit

Permalink
Update decoder/src/log/format/mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas authored Jan 10, 2024
1 parent 251e214 commit 1d79746
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions decoder/src/log/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,7 @@ impl InternalFormatter {
let path_iter = Path::new(file).iter();
let number_of_components = path_iter.clone().count();

let number_of_components_to_join = if number_of_components > level_of_detail as usize {
level_of_detail as usize
} else {
number_of_components
};
let number_of_components_to_join = number_of_components.min(level_of_detail as usize);

let number_of_elements_to_skip =
number_of_components.saturating_sub(number_of_components_to_join);
Expand Down

0 comments on commit 1d79746

Please sign in to comment.