From c04609bcdb7c7952501ddffc82fb97246ae0f6d4 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 25 Nov 2021 09:41:41 +0200 Subject: Implement clippy lint suggestions --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 4e89250..3b09791 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,7 +89,7 @@ fn main() -> Result<(), String> { println!("{}:\n{}\n", symbol, *expr); } continue; - } else if !s.ends_with(";") && s != "" && !s.starts_with("#") { + } else if !s.ends_with(';') && !s.is_empty() && !s.starts_with('#') { appending_input = true; continue; } else { @@ -110,6 +110,6 @@ fn main() -> Result<(), String> { } } } - _ => return Err("invalid subcommand".to_owned()), + _ => Err("invalid subcommand".to_owned()), } } -- cgit v1.3