Including quorum logic for PUT and GET operations #15
test.yml
on: pull_request
ubuntu / stable / coverage
52s
Matrix: required
Annotations
24 warnings
[clippy] src/cmd/cluster/cluster_state.rs#L18:
src/cmd/cluster/cluster_state.rs#L18
warning: you should consider adding a `Default` implementation for `ClusterState`
--> src/cmd/cluster/cluster_state.rs:18:5
|
18 | / pub fn new() -> Self {
19 | | Self
20 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
17 + impl Default for ClusterState {
18 + fn default() -> Self {
19 + Self::new()
20 + }
21 + }
|
|
[clippy] src/cmd/get.rs#L46:
src/cmd/get.rs#L46
warning: unneeded `return` statement
--> src/cmd/get.rs:46:17
|
46 | return Ok(GetResponse { value });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
46 - return Ok(GetResponse { value });
46 + Ok(GetResponse { value })
|
|
[clippy] src/cmd/get.rs#L48:
src/cmd/get.rs#L48
warning: unneeded `return` statement
--> src/cmd/get.rs:48:17
|
48 | return Err(Error::NotFound { key: self.key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
48 - return Err(Error::NotFound { key: self.key });
48 + Err(Error::NotFound { key: self.key })
|
|
[clippy] src/cmd/get.rs#L103:
src/cmd/get.rs#L103
warning: unneeded `return` statement
--> src/cmd/get.rs:103:17
|
103 | / return Err(Error::QuorumNotReached {
104 | | operation: "Get".to_string(),
105 | | required: quorum_config.reads,
106 | | got: successes,
107 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
103 ~ Err(Error::QuorumNotReached {
104 + operation: "Get".to_string(),
105 + required: quorum_config.reads,
106 + got: successes,
107 ~ })
|
|
[clippy] src/cmd/get.rs#L111:
src/cmd/get.rs#L111
warning: unneeded `return` statement
--> src/cmd/get.rs:111:21
|
111 | return Ok(GetResponse { value });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
111 - return Ok(GetResponse { value });
111 + Ok(GetResponse { value })
|
|
[clippy] src/cmd/get.rs#L113:
src/cmd/get.rs#L113
warning: unneeded `return` statement
--> src/cmd/get.rs:113:21
|
113 | return Err(Error::NotFound { key: self.key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
113 - return Err(Error::NotFound { key: self.key });
113 + Err(Error::NotFound { key: self.key })
|
|
[clippy] src/cmd/get.rs#L128:
src/cmd/get.rs#L128
warning: unneeded `return` statement
--> src/cmd/get.rs:128:17
|
128 | return Ok(res);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
128 - return Ok(res);
128 + Ok(res)
|
|
[clippy] src/cmd/get.rs#L130:
src/cmd/get.rs#L130
warning: unneeded `return` statement
--> src/cmd/get.rs:130:17
|
130 | return Err(Error::NotFound { key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
130 - return Err(Error::NotFound { key });
130 + Err(Error::NotFound { key })
|
|
[clippy] src/cmd/put.rs#L53:
src/cmd/put.rs#L53
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:53:20
|
53 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
[clippy] src/cmd/put.rs#L53:
src/cmd/put.rs#L53
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:53:37
|
53 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy] src/cmd/put.rs#L105:
src/cmd/put.rs#L105
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:105:24
|
105 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy] src/cmd/put.rs#L105:
src/cmd/put.rs#L105
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:105:41
|
105 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy] src/cmd/cluster/cluster_state.rs#L18:
src/cmd/cluster/cluster_state.rs#L18
warning: you should consider adding a `Default` implementation for `ClusterState`
--> src/cmd/cluster/cluster_state.rs:18:5
|
18 | / pub fn new() -> Self {
19 | | Self
20 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
17 + impl Default for ClusterState {
18 + fn default() -> Self {
19 + Self::new()
20 + }
21 + }
|
|
[clippy] src/cmd/get.rs#L46:
src/cmd/get.rs#L46
warning: unneeded `return` statement
--> src/cmd/get.rs:46:17
|
46 | return Ok(GetResponse { value });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
46 - return Ok(GetResponse { value });
46 + Ok(GetResponse { value })
|
|
[clippy] src/cmd/get.rs#L48:
src/cmd/get.rs#L48
warning: unneeded `return` statement
--> src/cmd/get.rs:48:17
|
48 | return Err(Error::NotFound { key: self.key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
48 - return Err(Error::NotFound { key: self.key });
48 + Err(Error::NotFound { key: self.key })
|
|
[clippy] src/cmd/get.rs#L103:
src/cmd/get.rs#L103
warning: unneeded `return` statement
--> src/cmd/get.rs:103:17
|
103 | / return Err(Error::QuorumNotReached {
104 | | operation: "Get".to_string(),
105 | | required: quorum_config.reads,
106 | | got: successes,
107 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
103 ~ Err(Error::QuorumNotReached {
104 + operation: "Get".to_string(),
105 + required: quorum_config.reads,
106 + got: successes,
107 ~ })
|
|
[clippy] src/cmd/get.rs#L111:
src/cmd/get.rs#L111
warning: unneeded `return` statement
--> src/cmd/get.rs:111:21
|
111 | return Ok(GetResponse { value });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
111 - return Ok(GetResponse { value });
111 + Ok(GetResponse { value })
|
|
[clippy] src/cmd/get.rs#L113:
src/cmd/get.rs#L113
warning: unneeded `return` statement
--> src/cmd/get.rs:113:21
|
113 | return Err(Error::NotFound { key: self.key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
113 - return Err(Error::NotFound { key: self.key });
113 + Err(Error::NotFound { key: self.key })
|
|
[clippy] src/cmd/get.rs#L128:
src/cmd/get.rs#L128
warning: unneeded `return` statement
--> src/cmd/get.rs:128:17
|
128 | return Ok(res);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
128 - return Ok(res);
128 + Ok(res)
|
|
[clippy] src/cmd/get.rs#L130:
src/cmd/get.rs#L130
warning: unneeded `return` statement
--> src/cmd/get.rs:130:17
|
130 | return Err(Error::NotFound { key });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
130 - return Err(Error::NotFound { key });
130 + Err(Error::NotFound { key })
|
|
[clippy] src/cmd/put.rs#L53:
src/cmd/put.rs#L53
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:53:20
|
53 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
[clippy] src/cmd/put.rs#L53:
src/cmd/put.rs#L53
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:53:37
|
53 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy] src/cmd/put.rs#L105:
src/cmd/put.rs#L105
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:105:24
|
105 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy] src/cmd/put.rs#L105:
src/cmd/put.rs#L105
warning: useless conversion to the same type: `bytes::Bytes`
--> src/cmd/put.rs:105:41
|
105 | db.put(self.key.into(), self.value.into()).await?;
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|