Skip to content

Commit ee48e58

Browse files
authored
Consistently import LayerState (#541)
Since the Poetry and Uv dependencies layers were the only layers to refer to `LayerState` by its fully qualified path.
1 parent 094ea00 commit ee48e58

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/layers/poetry_dependencies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use libcnb::Env;
66
use libcnb::build::BuildContext;
77
use libcnb::data::layer_name;
88
use libcnb::layer::{
9-
CachedLayerDefinition, EmptyLayerCause, InvalidMetadataAction, RestoredLayerAction,
9+
CachedLayerDefinition, EmptyLayerCause, InvalidMetadataAction, LayerState, RestoredLayerAction,
1010
};
1111
use libcnb::layer_env::{LayerEnv, ModificationBehavior, Scope};
1212
use libherokubuildpack::log::log_info;
@@ -68,10 +68,10 @@ pub(crate) fn install_dependencies(
6868
let layer_path = layer.path();
6969

7070
match layer.state {
71-
libcnb::layer::LayerState::Restored { .. } => {
71+
LayerState::Restored { .. } => {
7272
log_info("Using cached virtual environment");
7373
}
74-
libcnb::layer::LayerState::Empty { cause } => {
74+
LayerState::Empty { cause } => {
7575
match cause {
7676
EmptyLayerCause::InvalidMetadataAction { .. }
7777
| EmptyLayerCause::RestoredLayerAction { .. } => {

src/layers/uv_dependencies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use libcnb::Env;
66
use libcnb::build::BuildContext;
77
use libcnb::data::layer_name;
88
use libcnb::layer::{
9-
CachedLayerDefinition, EmptyLayerCause, InvalidMetadataAction, RestoredLayerAction,
9+
CachedLayerDefinition, EmptyLayerCause, InvalidMetadataAction, LayerState, RestoredLayerAction,
1010
};
1111
use libcnb::layer_env::{LayerEnv, ModificationBehavior, Scope};
1212
use libherokubuildpack::log::log_info;
@@ -72,10 +72,10 @@ pub(crate) fn install_dependencies(
7272
let layer_path = layer.path();
7373

7474
match layer.state {
75-
libcnb::layer::LayerState::Restored { .. } => {
75+
LayerState::Restored { .. } => {
7676
log_info("Using cached virtual environment");
7777
}
78-
libcnb::layer::LayerState::Empty { cause } => {
78+
LayerState::Empty { cause } => {
7979
match cause {
8080
EmptyLayerCause::InvalidMetadataAction { .. }
8181
| EmptyLayerCause::RestoredLayerAction { .. } => {

0 commit comments

Comments
 (0)