Skip to content

Commit

Permalink
Reorder layer error enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Mar 11, 2024
1 parent 65f150a commit c12b1b0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions libcnb/src/layer/handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,29 +232,29 @@ pub enum ReadLayerError {
IoError(#[from] std::io::Error),
}

#[derive(thiserror::Error, Debug)]
pub enum WriteLayerMetadataError {
#[error("Unexpected I/O error while writing layer metadata: {0}")]
IoError(#[from] std::io::Error),

#[error("Error while writing layer content metadata TOML: {0}")]
TomlFileError(#[from] TomlFileError),
}

#[derive(thiserror::Error, Debug)]
#[allow(clippy::enum_variant_names)]
pub enum WriteLayerError {
#[error("{0}")]
WriteLayerEnvError(#[from] std::io::Error),

#[error("{0}")]
ReplaceLayerSbomsError(#[from] ReplaceLayerSbomsError),

#[error("{0}")]
WriteLayerMetadataError(#[from] WriteLayerMetadataError),

#[error("{0}")]
ReplaceLayerExecdProgramsError(#[from] ReplaceLayerExecdProgramsError),

#[error("{0}")]
ReplaceLayerSbomsError(#[from] ReplaceLayerSbomsError),
}

#[derive(thiserror::Error, Debug)]
pub enum WriteLayerMetadataError {
#[error("Unexpected I/O error while writing layer metadata: {0}")]
IoError(#[from] std::io::Error),

#[error("Error while writing layer content metadata TOML: {0}")]
TomlFileError(#[from] TomlFileError),
}

#[derive(thiserror::Error, Debug)]
Expand Down

0 comments on commit c12b1b0

Please sign in to comment.