drive by fix needless allocation of const string number
This commit is contained in:
@@ -771,8 +771,12 @@ impl EmitterWriter {
|
||||
self
|
||||
}
|
||||
|
||||
fn maybe_anonymized(&self, line_num: usize) -> String {
|
||||
if self.ui_testing { ANONYMIZED_LINE_NUM.to_string() } else { line_num.to_string() }
|
||||
fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
|
||||
if self.ui_testing {
|
||||
Cow::Borrowed(ANONYMIZED_LINE_NUM)
|
||||
} else {
|
||||
Cow::Owned(line_num.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_line(
|
||||
|
||||
Reference in New Issue
Block a user