Skip to content

Commit 0fe93da

Browse files
committed
refactor(error)!: use Box<figment::Error> to reduce Error size
1 parent 7d4c1c2 commit 0fe93da

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cmd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ impl Pacaptr {
349349
.join(Config::env_provider())
350350
.join(Config::file_provider())
351351
.extract::<Config>()
352+
.map_err(Box::new)
352353
})?);
353354
self.dispatch_from(cfg).await
354355
}

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub enum Error {
2929

3030
/// Error when handling a [`Config`](crate::config::Config).
3131
#[error("failed to parse config")]
32-
ConfigError(#[from] figment::Error),
32+
ConfigError(#[from] Box<figment::Error>),
3333

3434
/// A [`Cmd`](crate::exec::Cmd) failed to finish.
3535
#[error("failed to get exit code of subprocess")]

0 commit comments

Comments
 (0)