Skip to content

Commit

Permalink
Replace magic constant '2'
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Jun 13, 2019
1 parent e898d57 commit 3d97fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct DisplayListFormatter {
}

impl DisplayListFormatter {
pub const ANONYMIZED_LINE_NUM: &'static str = "LL";
const ANONYMIZED_LINE_NUM: &'static str = "LL";

/// Constructor for the struct.
///
Expand Down Expand Up @@ -89,7 +89,7 @@ impl DisplayListFormatter {
..
} => {
if self.anonymized_line_numbers {
2 // "LL"
Self::ANONYMIZED_LINE_NUM.len()
} else {
cmp::max(lineno.to_string().len(), max)
}
Expand Down

0 comments on commit 3d97fb9

Please sign in to comment.