chore: Fix clippy::needless_borrow up to an editor

This commit is contained in:
Piotr Osiewicz 2024-01-21 14:55:08 +01:00
parent c3102feeeb
commit 6c82380232
29 changed files with 86 additions and 88 deletions

View file

@ -2054,7 +2054,7 @@ fn dirty_message_for(buffer_path: Option<ProjectPath>) -> String {
let path = buffer_path
.as_ref()
.and_then(|p| p.path.to_str())
.unwrap_or(&"This buffer");
.unwrap_or("This buffer");
let path = truncate_and_remove_front(path, 80);
format!("{path} contains unsaved edits. Do you want to save it?")
}