aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
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()),
}
}