Updated to non path dependency for bp3d-logger #19
development.yml
on: push
Annotations
2 errors and 36 warnings
written amount is not handled:
src/profiler/thread/core.rs#L200
error: written amount is not handled
--> src/profiler/thread/core.rs:200:5
|
200 | client.write(&bytes).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncWriteExt::write_all` instead, or handle partial writes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
= note: `#[deny(clippy::unused_io_amount)]` on by default
|
Check | Clippy
Clippy had exited with the 101 exit code
|
unused import: `bytesutil::WriteExt`:
src/profiler/thread/store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src/profiler/thread/store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src/util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src/util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `bytesutil::WriteExt`:
src/profiler/thread/store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src/profiler/thread/store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src/util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src/util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (ubuntu-20.04)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unused import: `bytesutil::WriteExt`:
src/profiler/thread/store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src/profiler/thread/store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src/util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src/util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `bytesutil::WriteExt`:
src/profiler/thread/store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src/profiler/thread/store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src/util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src/util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (macos-11)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unused import: `bytesutil::WriteExt`:
src\profiler\thread\store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src\profiler\thread\store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src\util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src\util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `bytesutil::WriteExt`:
src\profiler\thread\store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src\profiler\thread\store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src\util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src\util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (windows-2019)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Get Version
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo-version@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check | Audit
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/audit-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
you should consider adding a `Default` implementation for `DisableStdoutLogger`:
src/lib.rs#L174
warning: you should consider adding a `Default` implementation for `DisableStdoutLogger`
--> src/lib.rs:174:5
|
174 | / pub fn new() -> DisableStdoutLogger {
175 | | if STDOUT_DISABLE_RC.fetch_add(1, Ordering::Relaxed) == 0 {
176 | | //If no previous instances were created, disable the stdout/stderr logger.
177 | | //First, flush any waiting message.
... |
182 | | DisableStdoutLogger
183 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
172 + impl Default for DisableStdoutLogger {
173 + fn default() -> Self {
174 + Self::new()
175 + }
176 + }
|
|
you should consider adding a `Default` implementation for `LogBuffer`:
src/lib.rs#L142
warning: you should consider adding a `Default` implementation for `LogBuffer`
--> src/lib.rs:142:5
|
142 | / pub fn new() -> LogBuffer {
143 | | if LOG_BUFFER_RC.fetch_add(1, Ordering::Relaxed) == 0 {
144 | | //If no previous buffers were created, enable the log buffer.
145 | | bp3d_logger::enable_log_buffer();
146 | | }
147 | | LogBuffer(())
148 | | }
| |_____^
|
= 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
|
140 + impl Default for LogBuffer {
141 + fn default() -> Self {
142 + Self::new()
143 + }
144 + }
|
|
needless `fn main` in doctest:
src/lib.rs#L117
warning: needless `fn main` in doctest
--> src/lib.rs:117:5
|
117 | /// fn main() {
| _____^
118 | | /// bp3d_tracing::setup!("my-super-app");
119 | | /// // ... application code goes here
120 | | /// }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/profiler/thread/core.rs#L242
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/profiler/thread/core.rs:242:17
|
242 | / match cmd.unwrap() {
243 | | command::Control::Terminate => {
244 | | return;
245 | | },
246 | | _ => ()
247 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
242 ~ if let command::Control::Terminate = cmd.unwrap() {
243 + return;
244 + }
|
|
unneeded `return` statement:
src/profiler/thread/core.rs#L243
warning: unneeded `return` statement
--> src/profiler/thread/core.rs:243:53
|
243 | command::Control::Terminate => {
| _____________________________________________________^
244 | | return;
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
243 - command::Control::Terminate => {
244 - return;
243 + command::Control::Terminate => {
|
|
this lifetime isn't used in the impl:
src/profiler/network_types/message.rs#L247
warning: this lifetime isn't used in the impl
--> src/profiler/network_types/message.rs:247:6
|
247 | impl<'a> Msg for SpanDataset {
| ^^
|
= 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
|
name `BOOL` contains a capitalized acronym:
src/profiler/network_types/log.rs#L17
warning: name `BOOL` contains a capitalized acronym
--> src/profiler/network_types/log.rs:17:5
|
17 | BOOL = 11,
| ^^^^ help: consider making the acronym lowercase, except the initial letter: `Bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
|
name `STR` contains a capitalized acronym:
src/profiler/network_types/log.rs#L16
warning: name `STR` contains a capitalized acronym
--> src/profiler/network_types/log.rs:16:5
|
16 | STR = 10,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
|
length comparison to zero:
src/profiler/network_types/deserializer.rs#L163
warning: length comparison to zero
--> src/profiler/network_types/deserializer.rs:163:12
|
163 | if self.buffer().len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.buffer().is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/logger.rs#L128
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/logger.rs:128:30
|
128 | bp3d_logger::raw_log(&msg);
| ^^^^ help: change this to: `msg`
|
= 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
|
using `clone` on type `SpanId` which implements the `Copy` trait:
src/core.rs#L168
warning: using `clone` on type `SpanId` which implements the `Copy` trait
--> src/core.rs:168:30
|
168 | stack.last().map(|v| v.id.clone())
| ^^^^^^^^^^^^ help: try removing the `clone` call: `v.id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
initializer for `thread_local` value can be made `const`:
src/core.rs#L142
warning: initializer for `thread_local` value can be made `const`
--> src/core.rs:142:50
|
142 | static SPAN_STACK: RefCell<Vec<SpanLocal>> = RefCell::new(Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(Vec::new()) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
= note: `#[warn(clippy::thread_local_initializer_can_be_made_const)]` on by default
|
the borrowed expression implements the required traits:
src/config/mod.rs#L39
warning: the borrowed expression implements the required traits
--> src/config/mod.rs:39:52
|
39 | if let Ok(v) = std::fs::read_to_string(&v) {
| ^^ help: change this to: `v`
|
= 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
|
this `impl` can be derived:
src/config/model.rs#L136
warning: this `impl` can be derived
--> src/config/model.rs:136:1
|
136 | / impl Default for Config {
137 | | fn default() -> Self {
138 | | Self {
139 | | mode: None,
... |
143 | | }
144 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
130 + #[derive(Default)]
131 | pub struct Config {
|
|
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value:
src/config/model.rs#L55
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> src/config/model.rs:55:23
|
55 | pub fn to_tracing(&self) -> tracing_core::Level {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
|
methods `into_u64` and `get_id_instance` are never used:
src/util.rs#L88
warning: methods `into_u64` and `get_id_instance` are never used
--> src/util.rs:88:12
|
83 | impl SpanId {
| ----------- methods in this implementation
...
88 | pub fn into_u64(self) -> u64 {
| ^^^^^^^^
...
92 | pub fn get_id_instance(&self) -> (NonZeroU32, u32) {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `bytesutil::WriteExt`:
src/profiler/thread/store.rs#L29
warning: unused import: `bytesutil::WriteExt`
--> src/profiler/thread/store.rs:29:5
|
29 | use bytesutil::WriteExt;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
Check | Clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/clippy-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Format Code
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/rustfmt-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|