Skip to content

Commit

Permalink
chore: Update rust-toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Mikulicic committed Oct 13, 2023
1 parent d45f3ce commit 53da311
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Leveraging the pre-built Docker images with
# cargo-chef and the Rust toolchain
FROM lukemathwalker/cargo-chef:latest-rust-1.71.0@sha256:771356d2c2cb88ec004e1aa1c270065e28ac9d08d005ea64ac6aae9f9c70aca1 AS chef
FROM lukemathwalker/cargo-chef:latest-rust-1.73.0@sha256:09ec7a922dc592d980f3fcfa97b873e1a678ad2fb252671569a65187f1cd4a75 AS chef
WORKDIR app

FROM chef AS planner
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.71"
components = [ "rustfmt", "clippy" ]
channel = "1.73"
components = ["rustfmt", "clippy"]
6 changes: 3 additions & 3 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ fn apply_mappings(
let mut metadata = serde_json::value::to_value(template.metadata.clone())?;
set_field_path(
&mut metadata,
&to_field_path.strip_prefix("metadata.").unwrap(),
to_field_path.strip_prefix("metadata.").unwrap(),
subtree.clone(),
)?;
template.metadata = serde_json::value::from_value(metadata)?;
} else {
set_field_path(&mut template.data, &to_field_path, subtree.clone())?;
set_field_path(&mut template.data, to_field_path, subtree.clone())?;
}
}
}
Expand Down Expand Up @@ -348,7 +348,7 @@ where
{
let resource_json = serde_json::to_value(&resource)?;
let from_field_path = if let Some(from_field_path) = from_field_path {
if from_field_path.len() == 0 {
if from_field_path.is_empty() {
"$".to_string()
} else {
format!("$.{}", from_field_path)
Expand Down

0 comments on commit 53da311

Please sign in to comment.