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:
@@ -714,6 +714,7 @@ impl<'comments> Formatter<'comments> {
|
||||
|
||||
let document = match expr {
|
||||
UntypedExpr::ByteArray { bytes, .. } => self.bytearray(bytes),
|
||||
|
||||
UntypedExpr::If {
|
||||
branches,
|
||||
final_else,
|
||||
|
||||
@@ -820,6 +820,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
#[allow(clippy::bool_to_int_with_if)]
|
||||
let minus_tail = if has_tail { 1 } else { 0 };
|
||||
|
||||
if current_clause_index as i64 - minus_tail == prev_index {
|
||||
|
||||
Reference in New Issue
Block a user