Skip to content

Commit

Permalink
Rename execute to handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Apr 10, 2024
1 parent a3c6232 commit 78ea79b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions libcnb/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::data::store::Store;
use crate::data::{
buildpack::ComponentBuildpackDescriptor, buildpack_plan::BuildpackPlan, launch::Launch,
};
use crate::layer::handling::LayerErrorOrBuildpackError;
use crate::layer::trait_api::handling::LayerErrorOrBuildpackError;
use crate::layer::{
CachedLayerDefinition, InspectExistingAction, IntoAction, InvalidMetadataAction, LayerRef,
UncachedLayerDefinition,
Expand Down Expand Up @@ -126,7 +126,7 @@ impl<B: Buildpack + ?Sized> BuildContext<B> {
) -> crate::Result<LayerRef<B, (), ()>, B::Error> {
let layer_definition = layer_definition.borrow();

crate::layer::execute(
crate::layer::struct_api::handling::handle_layer(
LayerTypes {
launch: layer_definition.launch,
build: layer_definition.build,
Expand All @@ -151,7 +151,7 @@ impl<B: Buildpack + ?Sized> BuildContext<B> {
{
let layer_definition = layer_definition.borrow();

crate::layer::execute(
crate::layer::struct_api::handling::handle_layer(
LayerTypes {
launch: layer_definition.launch,
build: layer_definition.build,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use serde::Serialize;
use std::marker::PhantomData;
use std::path::{Path, PathBuf};

pub(crate) fn execute<B, M, MA, IA, MC, IC>(
pub(crate) fn handle_layer<B, M, MA, IA, MC, IC>(
layer_types: LayerTypes,
invalid_metadata: &dyn Fn(&GenericMetadata) -> MA,
inspect_existing: &dyn Fn(&M, &Path) -> IA,
Expand Down Expand Up @@ -90,7 +90,7 @@ where
LayerError::WriteLayerError(WriteLayerError::WriteLayerMetadataError(error))
})?;

execute(
handle_layer(
layer_types,
invalid_metadata,
inspect_existing,
Expand Down
3 changes: 1 addition & 2 deletions libcnb/src/layer/struct_api/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
pub(crate) mod execute;
pub(crate) mod handling;

use crate::layer::shared::{replace_layer_exec_d_programs, replace_layer_sboms, WriteLayerError};
use crate::layer::LayerError;
use crate::layer_env::LayerEnv;
use crate::sbom::Sbom;
use crate::Buildpack;
pub(crate) use execute::execute;
use libcnb_data::generic::GenericMetadata;
use libcnb_data::layer::LayerName;
use serde::Serialize;
Expand Down

0 comments on commit 78ea79b

Please sign in to comment.