Skip to content

Commit d471845

Browse files
committed
Box RecordOwned in enum SendToChannelErrorDropped
1 parent 5cc716e commit d471845

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

clippy.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

spdlog/src/error.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ pub enum SendToChannelError {
190190
#[non_exhaustive]
191191
pub enum SendToChannelErrorDropped {
192192
/// A `log` operation and a record are dropped.
193-
// TODO: Box the `RecordOwned` in the next minor version, as it's a bit large.
194-
Record(RecordOwned),
193+
Record(Box<RecordOwned>), // Boxed because `RecordOwned` is a bit large.
195194
/// A `flush` operation is dropped.
196195
Flush,
197196
}
@@ -244,7 +243,7 @@ impl SendToChannelErrorDropped {
244243
#[must_use]
245244
pub(crate) fn from_task(task: Task) -> Self {
246245
match task {
247-
Task::Log { record, .. } => Self::Record(record),
246+
Task::Log { record, .. } => Self::Record(Box::new(record)),
248247
Task::Flush { .. } => Self::Flush,
249248
}
250249
}

0 commit comments

Comments
 (0)