Skip to content

doc: Fix "lazy continuation" in slog::Logger #14

doc: Fix "lazy continuation" in slog::Logger

doc: Fix "lazy continuation" in slog::Logger #14

GitHub Actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in failed Sep 23, 2024 in 2s

Clippy (Stable ~ Linux/x86_64)

Clippy failed.

Details

Running cargo clippy took roughly ~1878ms to complete

  • Working Directory: repository directory

Annotations

Check failure on line 3269 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3269

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3269:34
     |
3269 |         s.serialize(self.record, self.key.clone(), self.serializer)
     |                                  ^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
     = note: `#[deny(clippy::clone_double_ref)]` on by default
help: try dereferencing it
     |
3269 |         s.serialize(self.record, &(*self.key).clone(), self.serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3269 |         s.serialize(self.record, <&str>::clone(self.key), self.serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 3278 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3278

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3278:47
     |
3278 |             let _ = self.serializer.emit_unit(self.key.clone());
     |                                               ^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
help: try dereferencing it
     |
3278 |             let _ = self.serializer.emit_unit(&(*self.key).clone());
     |                                               ~~~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3278 |             let _ = self.serializer.emit_unit(<&str>::clone(self.key));
     |                                               ~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 3656 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3656

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3656:34
     |
3656 |         self.1.serialize(record, self.0.clone(), serializer)
     |                                  ^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
help: try dereferencing it
     |
3656 |         self.1.serialize(record, &(*self.0).clone(), serializer)
     |                                  ~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3656 |         self.1.serialize(record, <&str>::clone(self.0), serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~~

Check warning on line 2423 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L2423

used import from `std` instead of `alloc`
Raw output
warning: used import from `std` instead of `alloc`
    --> src/lib.rs:2423:8
     |
2423 |     T: std::string::ToString + FromStr + PartialEq + fmt::Debug,
     |        ^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider importing the item from `alloc`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc
note: the lint level is defined here
    --> src/lib.rs:286:5
     |
286  |     clippy::std_instead_of_alloc,
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 3269 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3269

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3269:34
     |
3269 |         s.serialize(self.record, self.key.clone(), self.serializer)
     |                                  ^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
     = note: `#[deny(clippy::clone_double_ref)]` on by default
help: try dereferencing it
     |
3269 |         s.serialize(self.record, &(*self.key).clone(), self.serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3269 |         s.serialize(self.record, <&str>::clone(self.key), self.serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 3278 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3278

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3278:47
     |
3278 |             let _ = self.serializer.emit_unit(self.key.clone());
     |                                               ^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
help: try dereferencing it
     |
3278 |             let _ = self.serializer.emit_unit(&(*self.key).clone());
     |                                               ~~~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3278 |             let _ = self.serializer.emit_unit(<&str>::clone(self.key));
     |                                               ~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 3656 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L3656

using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
Raw output
error: using `clone` on a double-reference; this will copy the reference of type `&str` instead of cloning the inner type
    --> src/lib.rs:3656:34
     |
3656 |         self.1.serialize(record, self.0.clone(), serializer)
     |                                  ^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
help: try dereferencing it
     |
3656 |         self.1.serialize(record, &(*self.0).clone(), serializer)
     |                                  ~~~~~~~~~~~~~~~~~~
help: or try being explicit if you are sure, that you want to clone a reference
     |
3656 |         self.1.serialize(record, <&str>::clone(self.0), serializer)
     |                                  ~~~~~~~~~~~~~~~~~~~~~

Check warning on line 37 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L37

used import from `std` instead of `core`
Raw output
warning: used import from `std` instead of `core`
   --> src/tests.rs:37:14
    |
37  |         ) -> std::result::Result<Self::Ok, Self::Err> {
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider importing the item from `core`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
note: the lint level is defined here
   --> src/lib.rs:285:5
    |
285 |     clippy::std_instead_of_core,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 69 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L69

used import from `std` instead of `alloc`
Raw output
warning: used import from `std` instead of `alloc`
  --> src/tests.rs:69:26
   |
69 |     struct TestError<E = std::string::ParseError>(&'static str, Option<E>);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider importing the item from `alloc`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc

Check warning on line 115 in /home/runner/work/slog/slog/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.66.1 (90743e729 2023-01-10) in

/home/runner/work/slog/slog/src/lib.rs#L115

used import from `std` instead of `core`
Raw output
warning: used import from `std` instead of `core`
   --> src/tests.rs:115:18
    |
115 |             ) -> std::result::Result<Self::Ok, Self::Err> {
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider importing the item from `core`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core