Detach from lazy_static, use std::sync::OnceLock instead #142
clippy
10 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 10 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0-nightly (878c8a2a6 2024-02-29)
- cargo 1.78.0-nightly (8964c8ccf 2024-02-27)
- clippy 0.1.78 (878c8a2 2024-02-29)
Annotations
Check failure on line 165 in src/trc.rs
github-actions / clippy
non-local `impl` definition, they should be avoided as they go against expectation
error: non-local `impl` definition, they should be avoided as they go against expectation
--> src/trc.rs:161:5
|
161 | / impl From<LogSpecAsFilter> for EnvFilter {
162 | | fn from(wrapped_logspec: LogSpecAsFilter) -> Self {
163 | | Self::new(wrapped_logspec.0.to_string())
164 | | }
165 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `setup_tracing`
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: `-D non-local-definitions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(non_local_definitions)]`
Check failure on line 165 in src/trc.rs
github-actions / clippy
non-local `impl` definition, they should be avoided as they go against expectation
error: non-local `impl` definition, they should be avoided as they go against expectation
--> src/trc.rs:161:5
|
161 | / impl From<LogSpecAsFilter> for EnvFilter {
162 | | fn from(wrapped_logspec: LogSpecAsFilter) -> Self {
163 | | Self::new(wrapped_logspec.0.to_string())
164 | | }
165 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `setup_tracing`
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: `-D non-local-definitions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(non_local_definitions)]`
Check failure on line 457 in src/log_specification.rs
github-actions / clippy
direct implementation of `ToString`
error: direct implementation of `ToString`
--> src/log_specification.rs:426:1
|
426 | / impl ToString for LogSpecification {
427 | | #[must_use]
428 | | fn to_string(&self) -> String {
429 | | let mut w = String::new();
... |
456 | | }
457 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[deny(clippy::to_string_trait_impl)]` implied by `#[deny(clippy::all)]`
Check failure on line 94 in src/flexi_error.rs
github-actions / clippy
empty doc comment
error: empty doc comment
--> src/flexi_error.rs:94:5
|
94 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
note: the lint level is defined here
--> src/lib.rs:4:9
|
4 | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::empty_docs)]` implied by `#[deny(clippy::all)]`
Check failure on line 457 in src/log_specification.rs
github-actions / clippy
direct implementation of `ToString`
error: direct implementation of `ToString`
--> src/log_specification.rs:426:1
|
426 | / impl ToString for LogSpecification {
427 | | #[must_use]
428 | | fn to_string(&self) -> String {
429 | | let mut w = String::new();
... |
456 | | }
457 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[deny(clippy::to_string_trait_impl)]` implied by `#[deny(clippy::all)]`
Check failure on line 94 in src/flexi_error.rs
github-actions / clippy
empty doc comment
error: empty doc comment
--> src/flexi_error.rs:94:5
|
94 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
note: the lint level is defined here
--> src/lib.rs:4:9
|
4 | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::empty_docs)]` implied by `#[deny(clippy::all)]`
Check failure on line 26 in src/writers/file_log_writer/state.rs
github-actions / clippy
the item `crossbeam_channel` is imported redundantly
error: the item `crossbeam_channel` is imported redundantly
--> src/writers/file_log_writer/state.rs:26:25
|
26 | crossbeam_channel::{self, Sender as CrossbeamSender},
| ^^^^ the item `crossbeam_channel` is already defined here
Check failure on line 4 in src/primary_writer/std_writer.rs
github-actions / clippy
the item `crossbeam_channel` is imported redundantly
error: the item `crossbeam_channel` is imported redundantly
--> src/primary_writer/std_writer.rs:4:25
|
4 | crossbeam_channel::{self, SendError, Sender},
| ^^^^ the item `crossbeam_channel` is already defined here
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
Check failure on line 26 in src/writers/file_log_writer/state.rs
github-actions / clippy
the item `crossbeam_channel` is imported redundantly
error: the item `crossbeam_channel` is imported redundantly
--> src/writers/file_log_writer/state.rs:26:25
|
26 | crossbeam_channel::{self, Sender as CrossbeamSender},
| ^^^^ the item `crossbeam_channel` is already defined here
Check failure on line 4 in src/primary_writer/std_writer.rs
github-actions / clippy
the item `crossbeam_channel` is imported redundantly
error: the item `crossbeam_channel` is imported redundantly
--> src/primary_writer/std_writer.rs:4:25
|
4 | crossbeam_channel::{self, SendError, Sender},
| ^^^^ the item `crossbeam_channel` is already defined here
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`