about summary refs log tree commit diff
path: root/src/string.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-10-19 00:44:14 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2018-10-19 12:28:00 +0200
commitb25f974c0d6277de3f8f8473533f3f263ec9fbb7 (patch)
treeb57bb72c1fa54d881fe171f985fa795462c16eba /src/string.rs
parent7d713a2827d073e0141731d3fea1b06a5fbb2d58 (diff)
fix a few typos found via codespell.
Diffstat (limited to 'src/string.rs')
-rw-r--r--src/string.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.rs b/src/string.rs
index bbf51ffcba3..561d96813b0 100644
--- a/src/string.rs
+++ b/src/string.rs
@@ -62,7 +62,7 @@ impl<'a> StringFormat<'a> {
         )
     }
 
-    /// Like max_chars_with_indent but the indentation is not substracted.
+    /// Like max_chars_with_indent but the indentation is not subtracted.
     /// This allows to fit more graphemes from the string on a line when
     /// SnippetState::EndWithLineFeed.
     fn max_chars_without_indent(&self) -> Option<usize> {
@@ -236,7 +236,7 @@ fn break_string(max_chars: usize, trim_end: bool, line_end: &str, input: &[&str]
             .iter()
             .rposition(|grapheme| not_whitespace_except_line_feed(grapheme))
             .unwrap_or(index);
-        // Take into account newlines occuring in input[0..=index], i.e., the possible next new
+        // Take into account newlines occurring in input[0..=index], i.e., the possible next new
         // line. If there is one, then text after it could be rewritten in a way that the available
         // space is fully used.
         for (i, grapheme) in input[0..=index].iter().enumerate() {