Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d6c36a6

Browse files
committed
Replace magic constant '2'
1 parent e353781 commit d6c36a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/formatter/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub struct DisplayListFormatter {
5454
}
5555

5656
impl DisplayListFormatter {
57-
pubconst 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)

AltStyle によって変換されたページ (->オリジナル) /