From cd47c0a79360e6312b6349d4aec09237ef170ebb Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Sat, 21 Jan 2023 17:30:37 +0100 Subject: [PATCH] refactoring: remove return from prompt style fmt functions --- src/prompt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prompt.rs b/src/prompt.rs index 7221708..26aa31a 100644 --- a/src/prompt.rs +++ b/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) } }