diff --git a/clippy.toml b/clippy.toml deleted file mode 100644 index cf979c08..00000000 --- a/clippy.toml +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: Remove this in the next minor version (After `RecordOwned` is boxed in `SendToChannelErrorDropped`) -large-error-threshold = 136 diff --git a/spdlog/src/error.rs b/spdlog/src/error.rs index 65fd60fd..c52390d0 100644 --- a/spdlog/src/error.rs +++ b/spdlog/src/error.rs @@ -190,8 +190,7 @@ pub enum SendToChannelError { #[non_exhaustive] pub enum SendToChannelErrorDropped { /// A `log` operation and a record are dropped. - // TODO: Box the `RecordOwned` in the next minor version, as it's a bit large. - Record(RecordOwned), + Record(Box), // Boxed because `RecordOwned` is a bit large. /// A `flush` operation is dropped. Flush, } @@ -244,7 +243,7 @@ impl SendToChannelErrorDropped { #[must_use] pub(crate) fn from_task(task: Task) -> Self { match task { - Task::Log { record, .. } => Self::Record(record), + Task::Log { record, .. } => Self::Record(Box::new(record)), Task::Flush { .. } => Self::Flush, } }