Skip to content

Commit

Permalink
Make the first element of sss a value not a reference
Browse files Browse the repository at this point in the history
Note that it is still necessary to clone it, to pass as the argument to
the recursive call _and_ to use as the base for a fold.

Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Nov 19, 2024
1 parent 1eb8dee commit 818b9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/strat_engine/crypt/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn clevis_info_from_metadata(
/// recursion_limit,
/// &|_obj| Ok(Vec::new()),
/// &|_| Ok(Vec::new()),
/// &mut (&Vec::new(), &mut |mut acc, _premise| {
/// &mut (Vec::new(), &mut |mut acc, _premise| {
/// acc.push(2);
/// Ok(acc)
/// }),
Expand All @@ -233,7 +233,7 @@ fn traverse_clevis_config<T>(
recursion_limit: u64,
tang_func: &dyn Fn(&Map<String, Value>) -> StratisResult<T>,
tpm2_func: &dyn Fn(&Map<String, Value>) -> StratisResult<T>,
sss: &mut (&T, &mut dyn FnMut(T, T) -> StratisResult<T>),
sss: &mut (T, &mut dyn FnMut(T, T) -> StratisResult<T>),
) -> StratisResult<T>
where
T: Clone,
Expand Down Expand Up @@ -312,7 +312,7 @@ fn all_tang_configs_have_url_trust_info(
.unwrap_or(false))
},
&|_| Ok(true),
&mut (&true, &mut |acc, premise| Ok(acc && premise)),
&mut (true, &mut |acc, premise| Ok(acc && premise)),
)
}

Expand Down

0 comments on commit 818b9e9

Please sign in to comment.