diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2021-11-25 09:41:41 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2021-11-25 19:01:31 +0200 |
| commit | c04609bcdb7c7952501ddffc82fb97246ae0f6d4 (patch) | |
| tree | ffe56c8be1a218eac78733458b91563829c84f45 /src/main.rs | |
| parent | adbca5c121caaa7ed041a4b1bd9f2a2ac6981af7 (diff) | |
Implement clippy lint suggestions
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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()), } } |
