From d6c36a6a7b04c9f8aa152613591ebb1e0e4717df Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Thu, 13 Jun 2019 07:08:14 +0200 Subject: [PATCH] Replace magic constant '2' --- src/formatter/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/formatter/mod.rs b/src/formatter/mod.rs index 08e6f82..eb1392d 100644 --- a/src/formatter/mod.rs +++ b/src/formatter/mod.rs @@ -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. /// @@ -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) }