Use String::new() for empty strings.

This commit is contained in:
Stephen Chung
2022-08-21 17:35:44 +08:00
parent 248888ce0b
commit 2f02b30b6e
7 changed files with 25 additions and 27 deletions

View File

@@ -90,12 +90,12 @@ fn print_error(input: &str, mut err: EvalAltResult) {
let line_no = if lines.len() > 1 {
if pos.is_none() {
"".to_string()
String::new()
} else {
format!("{}: ", pos.line().unwrap())
}
} else {
"".to_string()
String::new()
};
// Print error position