Skip to content

Various fixups

Various fixups #128

GitHub Actions / clippy succeeded Mar 31, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (17)

src/types/deleted.rs|67 col 13| warning: redundant field names in struct initialization
--> src/types/deleted.rs:67:13
|
67 | mod_seq: mod_seq,
| ^^^^^^^^^^^^^^^^ help: replace it with: mod_seq
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)] on by default
src/types/deleted.rs|76 col 13| warning: redundant field names in struct initialization
--> src/types/deleted.rs:76:13
|
76 | mod_seq: mod_seq,
| ^^^^^^^^^^^^^^^^ help: replace it with: mod_seq
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
src/types/name.rs|95 col 9| warning: deref which would be done by auto-deref
--> src/types/name.rs:95:9
|
95 | &*self.name
| ^^^^^^^^^^^ help: try: &self.name
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: #[warn(clippy::explicit_auto_deref)] on by default
src/types/capabilities.rs|67 col 16| warning: the following explicit lifetimes could be elided: 'a
--> src/types/capabilities.rs:67:16
|
67 | pub fn has<'a>(&self, cap: &Capability<'a>) -> bool {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: #[warn(clippy::needless_lifetimes)] on by default
help: elide the lifetimes
|
67 - pub fn has<'a>(&self, cap: &Capability<'a>) -> bool {
67 + pub fn has(&self, cap: &Capability<'_>) -> bool {
|
src/types/acls.rs|165 col 9| warning: deref which would be done by auto-deref
--> src/types/acls.rs:165:9
|
165 | &*self.mailbox
| ^^^^^^^^^^^^^^ help: try: &self.mailbox
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/acls.rs|170 col 9| warning: deref which would be done by auto-deref
--> src/types/acls.rs:170:9
|
170 | &*self.acls
| ^^^^^^^^^^^ help: try: &self.acls
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/acls.rs|247 col 9| warning: deref which would be done by auto-deref
--> src/types/acls.rs:247:9
|
247 | &*self.mailbox
| ^^^^^^^^^^^^^^ help: try: &self.mailbox
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/acls.rs|252 col 9| warning: deref which would be done by auto-deref
--> src/types/acls.rs:252:9
|
252 | &*self.identifier
| ^^^^^^^^^^^^^^^^^ help: try: &self.identifier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/acls.rs|321 col 9| warning: deref which would be done by auto-deref
--> src/types/acls.rs:321:9
|
321 | &*self.mailbox
| ^^^^^^^^^^^^^^ help: try: &self.mailbox
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/quota.rs|237 col 9| warning: deref which would be done by auto-deref
--> src/types/quota.rs:237:9
|
237 | &*self.borrow_inner().quota_root.mailbox_name
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: &self.borrow_inner().quota_root.mailbox_name
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
src/types/quota.rs|246 col 22| warning: deref on an immutable reference
--> src/types/quota.rs:246:22
|
246 | .map(|e| &*e.as_ref())
| ^^^^^^^^^^^^ help: if you would like to reborrow, try removing &*: e.as_ref()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: #[warn(clippy::borrow_deref_ref)] on by default
src/extensions/idle.rs|250 col 6| warning: this lifetime isn't used in the impl
--> src/extensions/idle.rs:250:6
|
250 | impl<'a> SetReadTimeout for Connection {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: #[warn(clippy::extra_unused_lifetimes)] on by default
src/extensions/idle.rs|256 col 6| warning: this lifetime isn't used in the impl
--> src/extensions/idle.rs:256:6
|
256 | impl<'a> SetReadTimeout for TcpStream {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
src/extensions/idle.rs|263 col 6| warning: this lifetime isn't used in the impl
--> src/extensions/idle.rs:263:6
|
263 | impl<'a> SetReadTimeout for TlsStream {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
src/extensions/list_status.rs|35 col 40| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/extensions/list_status.rs:35:40
|
35 | let mut lines: &[u8] = &input;
| ^^^^^^ help: change this to: input
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: #[warn(clippy::needless_borrow)] on by default
src/extensions/metadata.rs|36 col 17| warning: the borrowed expression implements the required traits
--> src/extensions/metadata.rs:36:17
|
36 | &format!("entry#{}", item_index + 1),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: format!("entry#{}", item_index + 1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: #[warn(clippy::needless_borrows_for_generic_args)] on by default
src/extensions/metadata.rs|41 col 49| warning: the borrowed expression implements the required traits
--> src/extensions/metadata.rs:41:49
|
41 | .map(|v| validate_str(synopsis, &format!("value#{}", item_index + 1), v.as_str()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: format!("value#{}", item_index + 1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args