Skip to content

Commit c1506bf

Browse files
committed
[adapters] Box backtrace inside ControllerError::StorageError.
This should clear up errors like this: ``` error: the `Err`-variant returned from this function is very large --> crates/iceberg/src/input.rs:204:33 | 204 | fn snapshot_descr(&self) -> Result<SnapshotDescr, ControllerError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes ``` Signed-off-by: Ben Pfaff <blp@feldera.com>
1 parent b8f7ee9 commit c1506bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/adapterlib/src/errors/controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ pub enum ControllerError {
698698
/// Describes the context where the error occurred.
699699
context: String,
700700
error: StorageError,
701-
backtrace: Backtrace,
701+
backtrace: Box<Backtrace>,
702702
},
703703

704704
/// Enterprise-only feature.
@@ -1401,7 +1401,7 @@ impl ControllerError {
14011401
Self::StorageError {
14021402
context: context.into(),
14031403
error,
1404-
backtrace: Backtrace::capture(),
1404+
backtrace: Box::new(Backtrace::capture()),
14051405
}
14061406
}
14071407

0 commit comments

Comments
 (0)