-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add overflow_closures and overflow_match_arms opts
overflow_closures = true: result.and_then(|maybe_value| match maybe_value { None => ..., Some(value) => ..., }) overflow_closures = false: result.and_then(|maybe_value| { match maybe_value { None => ..., Some(value) => ..., } }) overflow_match_arms = true: match lorem { None => if ipsum { println!("Hello World"); }, Some(dolor) => ..., } overflow_match_arms = false: match lorem { None => { if ipsum { println!("Hello World"); } } Some(dolor) => ..., }
- Loading branch information
Showing
7 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// rustfmt-overflow_match_arms: false | ||
// Overflowing match arms | ||
|
||
fn main() { | ||
match lorem { | ||
Lorem::Ipsum => if ipsum { | ||
println!("dolor"); | ||
}, | ||
Lorem::Dolor => println!("amet"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// rustfmt-overflow_match_arms: true | ||
// Overflowing match arms | ||
|
||
fn main() { | ||
match lorem { | ||
Lorem::Ipsum => { | ||
if ipsum { | ||
println!("dolor"); | ||
} | ||
} | ||
Lorem::Dolor => println!("amet"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// rustfmt-overflow_match_arms: false | ||
// Overflowing match arms | ||
|
||
fn main() { | ||
match lorem { | ||
Lorem::Ipsum => { | ||
if ipsum { | ||
println!("dolor"); | ||
} | ||
} | ||
Lorem::Dolor => println!("amet"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// rustfmt-overflow_match_arms: true | ||
// Overflowing match arms | ||
|
||
fn main() { | ||
match lorem { | ||
Lorem::Ipsum => if ipsum { | ||
println!("dolor"); | ||
}, | ||
Lorem::Dolor => println!("amet"), | ||
} | ||
} |