Skip to content

Commit

Permalink
Added disable for large_enum_variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri6037 committed Aug 9, 2023
1 parent 7d83300 commit a4c996c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ use time::OffsetDateTime;

const BUF_SIZE: usize = 16; // The maximum count of log messages in the channel.

//Disable large_enum_variant as using a Box will inevitably cause a small allocation on a critical path,
//allocating in a critical code path will most likely result in degraded performance.
//And yes, logging is a critical path when using bp3d-tracing.
#[allow(clippy::large_enum_variant)]
enum Command {
Flush,
Log(LogMsg),
Expand Down

0 comments on commit a4c996c

Please sign in to comment.