Skip to content

Conversation

@bh2smith
Copy link

Motivation

Just getting started with the project and wanted to satisfy clippy before I dive in.

Solution

Addressed all clippy warnings in a single commit.

  1. Most were just removing return from thrown errors in favour of rust's inferred return.
  2. Changed some iterator.len() == 0 comparisons for iterator.is_empty().
  3. There was one warning regarding the use of .last().
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
  --> crates/cli/src/parse/timestamps.rs:26:17
   |
26 | /                 path.split(':')
27 | |                     .last()
   | |______________________-----^
   |                        |
   |                        help: try: `next_back()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last

PR Checklist

Existing tests should cover the bases here. No need for additional docs and are not expected to introduce any breaking changes.

  • Added Tests
  • Added Documentation
  • Breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant