diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-22 17:16:38 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-22 17:16:38 +0200 |
commit | b945e43103544fc31a0755841b380358b2c161e6 (patch) | |
tree | 80c6091c4268e6fec5cce02a08cdf6fa2b434300 /src/compiler.rs | |
parent | 41fc406af206e21014eaaba94bcf6b1854f892b3 (diff) | |
download | markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.tar.gz markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.tar.bz2 markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.zip |
Refactor to remove unneeded tuples in every states
Diffstat (limited to 'src/compiler.rs')
-rw-r--r-- | src/compiler.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<LineEnding> = 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; |