Skip to content

Commit 6b144eb

Browse files
authored
Simplify the Python layer's restored_layer_action (#539)
Wrapping in a `Result` is redundant since the function is infallible and libcnb supports returning a tuple directly from `restored_layer_action()`.
1 parent 83cba6f commit 6b144eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/layers/python.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ pub(crate) fn install_python(
3636
let cached_python_version = cached_metadata.python_version.clone();
3737
let reasons = cache_invalidation_reasons(cached_metadata, &new_metadata);
3838
if reasons.is_empty() {
39-
Ok((
39+
(
4040
RestoredLayerAction::KeepLayer,
4141
(cached_python_version, Vec::new()),
42-
))
42+
)
4343
} else {
44-
Ok((
44+
(
4545
RestoredLayerAction::DeleteLayer,
4646
(cached_python_version, reasons),
47-
))
47+
)
4848
}
4949
},
5050
},

0 commit comments

Comments
 (0)