Move enum definition closer to its usage.

This commit is contained in:
Mara Bos 2022-08-30 17:18:09 +02:00
parent df7fd119d2
commit 15754f5ea1

View File

@ -267,17 +267,17 @@ pub fn make_format_args(
})
};
let num_explicit_args = args.len();
let mut used = vec![false; num_explicit_args];
let mut invalid_refs = Vec::new();
let mut numeric_refences_to_named_arg = Vec::new();
enum ArgRef<'a> {
Index(usize),
Name(&'a str, Option<Span>),
}
use ArgRef::*;
let num_explicit_args = args.len();
let mut used = vec![false; num_explicit_args];
let mut invalid_refs = Vec::new();
let mut numeric_refences_to_named_arg = Vec::new();
let mut lookup_arg = |arg: ArgRef<'_>,
span: Option<Span>,
used_as: PositionUsedAs,