Skip to content

Commit 3d97fb9

Browse files
committed
Replace magic constant '2'
1 parent e898d57 commit 3d97fb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/formatter/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub struct DisplayListFormatter {
5454
}
5555

5656
impl DisplayListFormatter {
57-
pub const ANONYMIZED_LINE_NUM: &'static str = "LL";
57+
const ANONYMIZED_LINE_NUM: &'static str = "LL";
5858

5959
/// Constructor for the struct.
6060
///
@@ -89,7 +89,7 @@ impl DisplayListFormatter {
8989
..
9090
} => {
9191
if self.anonymized_line_numbers {
92-
2 // "LL"
92+
Self::ANONYMIZED_LINE_NUM.len()
9393
} else {
9494
cmp::max(lineno.to_string().len(), max)
9595
}

0 commit comments

Comments
 (0)