From b945e43103544fc31a0755841b380358b2c161e6 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 22 Jul 2022 17:16:38 +0200 Subject: Refactor to remove unneeded tuples in every states --- src/compiler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler.rs') diff --git a/src/compiler.rs b/src/compiler.rs index 1723190..a575221 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -201,7 +201,7 @@ impl<'a> CompileContext<'a> { #[allow(clippy::too_many_lines)] pub fn compile(events: &[Event], codes: &[Code], options: &Options) -> String { let mut index = 0; - let mut line_ending_inferred: Option = None; + let mut line_ending_inferred = None; // First, we figure out what the used line ending style is. // Stop when we find a line ending. @@ -240,7 +240,7 @@ pub fn compile(events: &[Event], codes: &[Code], options: &Options) -> String { }; let mut context = CompileContext::new(events, codes, options, line_ending_default); - let mut definition_indices: Vec<(usize, usize)> = vec![]; + let mut definition_indices = vec![]; let mut index = 0; let mut definition_inside = false; @@ -1041,7 +1041,7 @@ fn on_exit_media(context: &mut CompileContext) { .or(media.label_id) .map(|id| normalize_identifier(&id)); let label = media.label.unwrap(); - let mut definition: Option<&Definition> = None; + let mut definition = None; if let Some(id) = id { let mut index = 0; -- cgit