allan2 / dotenvy

A well-maintained fork of the Rust dotenv crate
MIT License
625 stars 39 forks source link

Fix clippy lints #87

Closed striezel closed 6 months ago

striezel commented 6 months ago

Clippy linting had some complaints, as seen in https://github.com/allan2/dotenvy/actions/runs/6670434445/job/18130275180:

warning: you seem to be trying to move all elements into a new `String`
   --> dotenv/src/parse.rs:183:34
    |
183 | ...                   &substitution_name.drain(..).collect::<String>(),
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut substitution_name)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect
    = note: `#[warn(clippy::drain_collect)]` on by default

All reported instances of that lint are fixed.

striezel commented 6 months ago

The clippy job is green again. :)