Browse Source

refactoring: remove return from prompt style fmt functions

main
fdai7451 2 years ago
parent
commit
cd47c0a793
  1. 6
      src/prompt.rs

6
src/prompt.rs

@ -17,13 +17,13 @@ impl PromptStyle {
}
fn fmt_none(&self) -> String {
return "» ".to_string();
"» ".to_string()
}
fn fmt_simple_directory(&self) -> String {
let path = env::current_dir().unwrap_or_default();
return format!("{} » ", path.to_string_lossy());
format!("{} » ", path.to_string_lossy())
}
fn fmt_bash_like(&self) -> String {
@ -43,7 +43,7 @@ impl PromptStyle {
let _hostname = gethostname::gethostname();
let hostname = _hostname.to_string_lossy();
return format!("[{}@{} {}]$ ", username, hostname, dir_as_string);
format!("[{}@{} {}]$ ", username, hostname, dir_as_string)
}
}

Loading…
Cancel
Save