Skip to content

Commit

Permalink
Fix minijinja deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Apr 20, 2024
1 parent 5955e39 commit 9647b25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/core/src/template/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl Object for GetFile {
let self_idx_ordered = order_bi_map.original_to_ordered[self.current_file_idx];
if self_idx_ordered > 0 {
let prev_idx_original = order_bi_map.ordered_to_original[self_idx_ordered - 1];
Ok(Value::from_serializable(&current_dir_files[prev_idx_original]))
Ok(Value::from_serialize(&current_dir_files[prev_idx_original]))
} else {
Ok(Value::UNDEFINED)
}
Expand All @@ -133,7 +133,7 @@ impl Object for GetFile {
let self_idx_ordered = order_bi_map.original_to_ordered[self.current_file_idx];
match order_bi_map.ordered_to_original.get(self_idx_ordered + 1) {
Some(&next_idx_original) => {
Ok(Value::from_serializable(&current_dir_files[next_idx_original]))
Ok(Value::from_serialize(&current_dir_files[next_idx_original]))
}
None => Ok(Value::UNDEFINED),
}
Expand Down Expand Up @@ -167,7 +167,7 @@ impl Object for GetFiles {

let (subdir_name,): (&str,) = from_args(args)?;
match self.current_dir_subdirs.get(subdir_name) {
Some(subdir_meta) => Ok(Value::from_serializable(&subdir_meta.files.get().unwrap())),
Some(subdir_meta) => Ok(Value::from_serialize(subdir_meta.files.get().unwrap())),
None => Err(minijinja::Error::new(
minijinja::ErrorKind::InvalidOperation,
format!("no subdirectory `{subdir_name}`"),
Expand Down

0 comments on commit 9647b25

Please sign in to comment.