Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy lints #87

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Fix clippy lints #87

merged 1 commit into from
Jan 22, 2024

Conversation

striezel
Copy link

@striezel striezel commented Jan 12, 2024

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.

Clippy linting had some complaints:

    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
Copy link
Author

The clippy job is green again. :)

@allan2 allan2 merged commit e38b6c4 into allan2:master Jan 22, 2024
7 of 8 checks passed
@striezel striezel deleted the make-clippy-happy branch January 23, 2024 02:24
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.

None yet

2 participants