Fix validator lookup by title.

We want the lookup to yield a result when there's only a single
  validator; and no title is provided. So that users can simply do
  'aiken address' in their project if it's unambiguous. The validator's
  name is only required to disambiguate between multiple validators.

  I also noticed that the order of arguments in with_validator was
  wrong. Somehow.
This commit is contained in:
KtorZ
2023-02-16 10:28:11 +01:00
parent 20841962f6
commit 3204322da6
5 changed files with 6 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ pub fn exec(
validator
.as_ref()
.map(|v| format!(".{v}"))
.unwrap_or("".to_string())
.unwrap_or_default()
)
});

View File

@@ -46,7 +46,7 @@ pub fn exec(
validator
.as_ref()
.map(|v| format!(".{v}"))
.unwrap_or("".to_string())
.unwrap_or_default()
)
});