about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2018-05-09 13:16:26 +1200
committerGitHub <noreply@github.com>2018-05-09 13:16:26 +1200
commit659d0c97412f2b010003df445f4c9cd84aa4bc75 (patch)
tree78d7d7a64f02f4e0d3d548acb15a879e2773ed9a /src/test
parentd98a1ca9f589607c90f8257498350d8f3f9b8df6 (diff)
parentbd25c7d0f73a5b6bf888593e717be391eaeb3e58 (diff)
Merge pull request #2684 from topecongiro/issue-2175
Apply small parent heuristic only when the chain is at the beginning of the line
Diffstat (limited to 'src/test')
-rw-r--r--src/test/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/mod.rs b/src/test/mod.rs
index 28161e89f35..631c8076ca7 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -633,7 +633,8 @@ impl ConfigurationSection {
                 Some((i, line)) => {
                     if line.starts_with("```rust") {
                         // Get the lines of the code block.
-                        let lines: Vec<String> = file.map(|(_i, l)| l)
+                        let lines: Vec<String> = file
+                            .map(|(_i, l)| l)
                             .take_while(|l| !l.starts_with("```"))
                             .collect();
                         let block = format!("{}\n", lines.join("\n"));
@@ -704,7 +705,8 @@ impl ConfigCodeBlock {
         assert!(self.code_block.is_some() && self.code_block_start.is_some());
 
         // See if code block begins with #![rustfmt_skip].
-        let fmt_skip = self.code_block
+        let fmt_skip = self
+            .code_block
             .as_ref()
             .unwrap()
             .split('\n')