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 warnings #466

Merged
merged 1 commit into from
May 6, 2019
Merged

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented May 6, 2019

New Clippy does not like when you write |s| s.to_owned() because making a new closure here is reduntant (you can pass the function std::borrow::ToOwned::to_owned there directly). This causes a warning and we treat warnings as errors, which breaks the builds.

Anyway, it's not like we need to avoid this computation here with a closure so rewrite the code to compute the default path in a more straightforward way and thus avoid the wrath of our resident god of static analysis.

New Clippy does not like when you write "|s| s.to_owned()" because
making a new closure here is reduntant (you can pass the function
std::borrow::ToOwned::to_owned there directly). This causes a warning
and we treat warnings as errors.

Anyway, it's not like we need to avoid this computation here with
a closure so rewrite the code to compute the default path in a more
straightforward way and thus avoid the wrath of our resident god of
static analysis.
@ilammy ilammy added the W-RustThemis 🦀 Wrapper: Rust-Themis, Rust API, Cargo crates label May 6, 2019
@ilammy ilammy requested a review from vixentael May 6, 2019 11:42
@ilammy ilammy requested a review from Lagovas as a code owner May 6, 2019 11:42
@vixentael
Copy link
Contributor

oh this world on modern development :)

we shall merge this PR before #465

@vixentael vixentael merged commit 6258984 into cossacklabs:master May 6, 2019
@vixentael vixentael deleted the ilammy/calm-down-clippy branch May 6, 2019 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
W-RustThemis 🦀 Wrapper: Rust-Themis, Rust API, Cargo crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants