diff --git a/render/src/umi/mod.rs b/render/src/umi/mod.rs index dd27b4de..883b9747 100644 --- a/render/src/umi/mod.rs +++ b/render/src/umi/mod.rs @@ -107,7 +107,7 @@ impl Umi { fn fetch_next_line(&mut self, new_line_index: usize) -> Option { if new_line_index < self.elements.len() { Some(self.elements[new_line_index].clone()) - }else{ + } else { None } } @@ -175,7 +175,7 @@ impl Umi { current_line_index += 1; let fetched = self.fetch_next_line(current_line_index); - if fetched.is_none(){ + if fetched.is_none() { break; } current_line = fetched.unwrap(); @@ -210,9 +210,9 @@ impl Umi { } current_line_index += 1; - + let fetched = self.fetch_next_line(current_line_index); - if fetched.is_none(){ + if fetched.is_none() { break; } current_line = fetched.unwrap(); diff --git a/render/src/umi/render.rs b/render/src/umi/render.rs index cad153f9..f1804db2 100644 --- a/render/src/umi/render.rs +++ b/render/src/umi/render.rs @@ -101,10 +101,7 @@ impl Renderer for UmiRenderer { ); self.pos += 1; - self.proceed(Umi::with_um( - vec![verbatim], - context.get_lang().to_string(), - )) + self.proceed(Umi::with_um(vec![verbatim], context.get_lang().to_string())) } fn render_heading( @@ -140,10 +137,7 @@ impl Renderer for UmiRenderer { ); self.pos += 1; - self.proceed(Umi::with_um( - vec![heading], - context.get_lang().to_string(), - )) + self.proceed(Umi::with_um(vec![heading], context.get_lang().to_string())) } fn render_bullet_list(