refactor(tvix/cli): rename a
to algo_str
Change-Id: I65d307126647841b50db008c21c155441a6b6cb5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9818 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
This commit is contained in:
parent
6800f1cdb9
commit
2d99bfc7b7
1 changed files with 3 additions and 2 deletions
|
@ -120,13 +120,14 @@ fn populate_output_configuration(
|
||||||
None => return Err(Error::ConflictingOutputTypes.into()),
|
None => return Err(Error::ConflictingOutputTypes.into()),
|
||||||
Some(out) => {
|
Some(out) => {
|
||||||
// treat an empty algo as None
|
// treat an empty algo as None
|
||||||
let a = if algo.is_empty() {
|
let algo_str = if algo.is_empty() {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(algo.as_ref())
|
Some(algo.as_ref())
|
||||||
};
|
};
|
||||||
|
|
||||||
let hash = nixhash::from_str(&nixhash_str, a).map_err(Error::InvalidOutputHash)?;
|
let hash =
|
||||||
|
nixhash::from_str(&nixhash_str, algo_str).map_err(Error::InvalidOutputHash)?;
|
||||||
|
|
||||||
// construct the NixHashWithMode.
|
// construct the NixHashWithMode.
|
||||||
out.ca_hash = match hash_mode.as_deref() {
|
out.ca_hash = match hash_mode.as_deref() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue