]> git.lizzy.rs Git - rust.git/blobdiff - src/shape.rs
Fixup formatting
[rust.git] / src / shape.rs
index 12a911a19315a583d9a62e733758567725cf7ad9..5868f0b85fdff2b1c89ce79219e0c55aa152defe 100644 (file)
@@ -91,7 +91,7 @@ fn to_string_inner(&self, config: &Config, offset: usize) -> Cow<'static, str> {
         };
         let num_chars = num_tabs + num_spaces;
         if num_tabs == 0 && num_chars + offset <= INDENT_BUFFER_LEN {
-            Cow::from(&INDENT_BUFFER[offset..num_chars + 1])
+            Cow::from(&INDENT_BUFFER[offset..=num_chars])
         } else {
             let mut indent = String::with_capacity(num_chars + if offset == 0 { 1 } else { 0 });
             if offset == 0 {