Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions apple-codesign/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@ pub enum AppleCodesignError {
#[cfg(feature = "notarize")]
#[error("s3 upload error: {0}")]
AwsS3PutObject(
aws_smithy_types::error::display::DisplayErrorContext<
aws_sdk_s3::error::SdkError<aws_sdk_s3::operation::put_object::PutObjectError>,
Box<
aws_smithy_types::error::display::DisplayErrorContext<
aws_sdk_s3::error::SdkError<aws_sdk_s3::operation::put_object::PutObjectError>,
>,
>,
),

Expand All @@ -396,11 +398,19 @@ pub enum AppleCodesignError {
Plist(#[from] plist::Error),

#[error("config error: {0:?}")]
Figment(#[from] figment::Error),
Figment(Box<figment::Error>),

#[error("environment constraints: {0}")]
EnvironmentConstraint(String),
}

/// Can't use `#[from]` because we have to box this; we are boxing it because it's
/// >200 bytes and clippy doesn't like it.
impl From<figment::Error> for AppleCodesignError {
fn from(err: figment::Error) -> Self {
Self::Figment(Box::new(err))
}
}

/// Result type for this library.
pub type Result<T, E = AppleCodesignError> = std::result::Result<T, E>;
2 changes: 1 addition & 1 deletion apple-codesign/src/notarization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl Notarizer {

rt.block_on(fut).map_err(|e| {
AppleCodesignError::AwsS3PutObject(
aws_smithy_types::error::display::DisplayErrorContext(e),
aws_smithy_types::error::display::DisplayErrorContext(e).into(),
)
})?;

Expand Down