Skip to content

Commit

Permalink
clippy: linter issues
Browse files Browse the repository at this point in the history
Fix clippy issue with unnecessary match statement

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
  • Loading branch information
Paul-weqe committed Dec 19, 2024
1 parent dc5e2b9 commit 13927ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ pub type ParsedArgs = VecDeque<(String, String)>;
pub(crate) fn normalize_input_line(line: &str) -> Option<String> {
// Ignore "!" comments.
// TODO: allow "!" within user input like interface descriptions
let line = match line.split('!').next() {
Some(line) => line,
None => return None,
};
let line = line.split('!').next()?;

// Remove redundant whitespaces.
let line = line.split_whitespace().collect::<Vec<_>>().join(" ");
Expand Down

0 comments on commit 13927ff

Please sign in to comment.