Skip to content

Commit

Permalink
RustDoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Jun 18, 2024
1 parent 11b6ce1 commit 953a9dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libcnb/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<B: Buildpack + ?Sized> BuildContext<B> {
/// allows users to be flexible in how and when the layer is modified and to abstract layer
/// creation away if necessary.
///
/// See [`IntoAction`] for details which values can be returned from the
/// See [`IntoAction`] for details on which values can be returned from the
/// `invalid_metadata_action` and `restored_layer_action` functions.
///
/// # Basic Example
Expand Down Expand Up @@ -440,7 +440,7 @@ impl<B: Buildpack + ?Sized> BuildContext<B> {
/// "PLANET",
/// "LV-246",
/// ))?;
///
/// #
/// #
/// # BuildResultBuilder::new().build()
/// # }
Expand Down
7 changes: 5 additions & 2 deletions libcnb/src/layer/struct_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ pub enum InvalidMetadataAction<M> {
ReplaceMetadata(M),
}

/// The action to take after inspecting restored layer data.
/// The action to take when a previously cached layer was restored.
#[derive(Copy, Clone, Debug)]
pub enum RestoredLayerAction {
/// Delete the restored layer.
DeleteLayer,
/// Keep the layer as-is.
// Keep the restored layer. It can then be used as-is or updated if required.
KeepLayer,
}

Expand Down Expand Up @@ -196,6 +196,9 @@ where
}

/// Reads the current layer environment from disk.
///
/// Note that this includes implicit entries such as adding `bin/` to `PATH`. See [`LayerEnv`]
/// docs for details on implicit entries.
pub fn read_env(&self) -> crate::Result<LayerEnv, B::Error> {
LayerEnv::read_from_layer_dir(self.path()).map_err(|error| {
crate::Error::LayerError(LayerError::ReadLayerError(ReadLayerError::IoError(error)))
Expand Down

0 comments on commit 953a9dd

Please sign in to comment.