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

Cargo clippy local failures #568

Open
Westwooo opened this issue Dec 13, 2024 · 0 comments
Open

Cargo clippy local failures #568

Westwooo opened this issue Dec 13, 2024 · 0 comments
Assignees

Comments

@Westwooo
Copy link
Contributor

There are some failures that Cargo clippy is picking up that need fixing:

➜  couchbase-shell git:(main) ✗ cargo clippy
    Checking utilities v0.1.0 (/Users/jackwestwood/cbshell/couchbase-shell/utilities)
    Checking couchbase-shell v1.0.0 (/Users/jackwestwood/cbshell/couchbase-shell)
warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/cli/vector_enrich_doc.rs:207:29
    |
207 | ...                   content_column = column.clone();
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `content_column.clone_from(column)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `#[warn(clippy::assigning_clones)]` on by default

warning: assigning the result of `Clone::clone()` may be inefficient
  --> src/config.rs:83:29
   |
83 | ...                   config_credentials.username = cred.username.clone()
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `config_credentials.username.clone_from(&cred.username)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `Clone::clone()` may be inefficient
  --> src/config.rs:86:29
   |
86 | ...                   config_credentials.password = cred.password.clone()
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `config_credentials.password.clone_from(&cred.password)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `Clone::clone()` may be inefficient
  --> src/config.rs:99:29
   |
99 | ...                   config_credentials.secret_key = cred.secret_key.clone()
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `config_credentials.secret_key.clone_from(&cred.secret_key)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/config.rs:102:29
    |
102 | ...                   config_credentials.access_key = cred.access_key.clone()
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `config_credentials.access_key.clone_from(&cred.access_key)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/state.rs:156:13
    |
156 |             *guard = active.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `guard.clone_from(&active)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: `couchbase-shell` (bin "cbsh") generated 6 warnings (run `cargo clippy --fix --bin "cbsh"` to apply 6 suggestions)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.50s
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

No branches or pull requests

1 participant