Skip to content

Commit

Permalink
Box RecordOwned in enum SendToChannelErrorDropped
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Jun 13, 2024
1 parent 5cc716e commit d471845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions clippy.toml

This file was deleted.

5 changes: 2 additions & 3 deletions spdlog/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RecordOwned>), // Boxed because `RecordOwned` is a bit large.
/// A `flush` operation is dropped.
Flush,
}
Expand Down Expand Up @@ -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,
}
}
Expand Down

0 comments on commit d471845

Please sign in to comment.