]> git.lizzy.rs Git - rust.git/blobdiff - src/file_lines.rs
Remove BlockIndentStyle::Inherit
[rust.git] / src / file_lines.rs
index 61b43375dda53345bc2b7d20d7b99f664db47f0d..145713ee1ec8bbaa930e1666ddb1f823c6d6d2ff 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 //! This module contains types and functions to support formatting specific line ranges.
+
 use std::{cmp, iter, path, str};
 
 use itertools::Itertools;
@@ -119,8 +120,10 @@ pub fn contains(&self, range: &LineRange) -> bool {
             Some(ref map) => map,
         };
 
-        match canonicalize_path_string(range.file_name())
-            .and_then(|canonical| map.get_vec(&canonical).ok_or(())) {
+        match canonicalize_path_string(range.file_name()).and_then(|canonical| {
+                                                                       map.get_vec(&canonical)
+                                                                           .ok_or(())
+                                                                   }) {
             Ok(ranges) => ranges.iter().any(|r| r.contains(Range::from(range))),
             Err(_) => false,
         }
@@ -181,8 +184,9 @@ impl JsonSpan {
     // To allow `collect()`ing into a `MultiMap`.
     fn into_tuple(self) -> Result<(String, Range), String> {
         let (lo, hi) = self.range;
-        let canonical = try!(canonicalize_path_string(&self.file)
-            .map_err(|_| format!("Can't canonicalize {}", &self.file)));
+        let canonical = try!(canonicalize_path_string(&self.file).map_err(|_| {
+            format!("Can't canonicalize {}", &self.file)
+        }));
         Ok((canonical, Range::new(lo, hi)))
     }
 }