fix(meta): refresh metastore if there is zdb up/down #177
Annotations
6 errors and 14 warnings
|
used `unwrap()` on `Some` value:
zstor/src/actors/backends.rs#L431
error: used `unwrap()` on `Some` value
--> zstor/src/actors/backends.rs:431:27
|
431 | let res = Some(res).unwrap();
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
= note: `-D clippy::unnecessary-literal-unwrap` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_literal_unwrap)]`
help: remove the `Some` and `unwrap()`
|
431 - let res = Some(res).unwrap();
431 + let res = res;
|
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
zstor/src/actors/backends.rs#L103
error: this expression creates a reference which is immediately dereferenced by the compiler
--> zstor/src/actors/backends.rs:103:65
|
103 | if let Some((Some(db), _)) = managed_db.get(&ci) {
| ^^^ help: change this to: `ci`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
zstor/src/actors/backends.rs#L83
error: this expression creates a reference which is immediately dereferenced by the compiler
--> zstor/src/actors/backends.rs:83:69
|
83 | if let Some((_, old_state)) = self.managed_meta_dbs.get(&ci) {
| ^^^ help: change this to: `ci`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
|
|
this `else { if .. }` block can be collapsed:
zstor/src/actors/backends.rs#L101
error: this `else { if .. }` block can be collapsed
--> zstor/src/actors/backends.rs:101:20
|
101 | } else {
| ____________________^
102 | | if new_state.is_writeable() {
103 | | if let Some((Some(db), _)) = managed_db.get(&ci) {
104 | | backends.push(db.clone());
105 | | }
106 | | }
107 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
101 ~ } else if new_state.is_writeable() {
102 + if let Some((Some(db), _)) = managed_db.get(&ci) {
103 + backends.push(db.clone());
104 + }
105 + }
|
|
|
unused import: `info`:
zstor/src/actors/backends.rs#L19
error: unused import: `info`
--> zstor/src/actors/backends.rs:19:25
|
19 | use log::{debug, error, info, warn};
| ^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
|
Clippy
Clippy had exited with the 101 exit code
|
|
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
|
Rustfmt
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
|
Clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
|
build
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|