Format
This commit is contained in:
parent
b433e63d2a
commit
fea3080f91
19 changed files with 0 additions and 22 deletions
|
@ -271,7 +271,6 @@ fn get_targets(workspace_hitlist: WorkspaceHitlist) -> Result<Vec<Target>, std::
|
||||||
std::io::ErrorKind::NotFound,
|
std::io::ErrorKind::NotFound,
|
||||||
str::from_utf8(&output.stderr).unwrap(),
|
str::from_utf8(&output.stderr).unwrap(),
|
||||||
))
|
))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn target_from_json(jtarget: &Value) -> Target {
|
fn target_from_json(jtarget: &Value) -> Target {
|
||||||
|
|
|
@ -102,7 +102,6 @@ fn match_cli_path_or_file(
|
||||||
config_path: Option<PathBuf>,
|
config_path: Option<PathBuf>,
|
||||||
input_file: &Path,
|
input_file: &Path,
|
||||||
) -> FmtResult<(Config, Option<PathBuf>)> {
|
) -> FmtResult<(Config, Option<PathBuf>)> {
|
||||||
|
|
||||||
if let Some(config_file) = config_path {
|
if let Some(config_file) = config_path {
|
||||||
let toml = Config::from_toml_path(config_file.as_ref())?;
|
let toml = Config::from_toml_path(config_file.as_ref())?;
|
||||||
return Ok((toml, Some(config_file)));
|
return Ok((toml, Some(config_file)));
|
||||||
|
|
|
@ -2985,7 +2985,6 @@ fn choose_rhs(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prefer_next_line(orig_rhs: &str, next_line_rhs: &str) -> bool {
|
fn prefer_next_line(orig_rhs: &str, next_line_rhs: &str) -> bool {
|
||||||
|
|
||||||
fn count_line_breaks(src: &str) -> usize {
|
fn count_line_breaks(src: &str) -> usize {
|
||||||
src.chars().filter(|&x| x == '\n').count()
|
src.chars().filter(|&x| x == '\n').count()
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,6 @@ pub fn write_file<T>(
|
||||||
where
|
where
|
||||||
T: Write,
|
T: Write,
|
||||||
{
|
{
|
||||||
|
|
||||||
fn source_and_formatted_text(
|
fn source_and_formatted_text(
|
||||||
text: &StringBuffer,
|
text: &StringBuffer,
|
||||||
filename: &str,
|
filename: &str,
|
||||||
|
|
|
@ -404,7 +404,6 @@ where
|
||||||
} else {
|
} else {
|
||||||
Some(format!("{}{}", args, output))
|
Some(format!("{}{}", args, output))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_bound_colon(context: &RewriteContext) -> &'static str {
|
fn type_bound_colon(context: &RewriteContext) -> &'static str {
|
||||||
|
@ -601,7 +600,6 @@ impl Rewrite for ast::TyParam {
|
||||||
result.push_str(&join_bounds(context, shape, &strs));
|
result.push_str(&join_bounds(context, shape, &strs));
|
||||||
}
|
}
|
||||||
if let Some(ref def) = self.default {
|
if let Some(ref def) = self.default {
|
||||||
|
|
||||||
let eq_str = match context.config.type_punctuation_density() {
|
let eq_str = match context.config.type_punctuation_density() {
|
||||||
TypeDensity::Compressed => "=",
|
TypeDensity::Compressed => "=",
|
||||||
TypeDensity::Wide => " = ",
|
TypeDensity::Wide => " = ",
|
||||||
|
|
|
@ -51,5 +51,4 @@ pub fn waltz(cwd: &Path) -> CliAssert {
|
||||||
formatted_comment = rewrite_comment(comment, block_style, width, offset, formatting_fig);
|
formatted_comment = rewrite_comment(comment, block_style, width, offset, formatting_fig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,5 +23,4 @@ fn main() {
|
||||||
},
|
},
|
||||||
_ => "something else",
|
_ => "something else",
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ fn solve_inline_size_constraints(&self,
|
||||||
block: &mut BlockFlow,
|
block: &mut BlockFlow,
|
||||||
input: &ISizeConstraintInput)
|
input: &ISizeConstraintInput)
|
||||||
-> ISizeConstraintSolution {
|
-> ISizeConstraintSolution {
|
||||||
|
|
||||||
let (inline_start,inline_size,margin_inline_start,margin_inline_end) =
|
let (inline_start,inline_size,margin_inline_start,margin_inline_end) =
|
||||||
match (inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx) {
|
match (inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx) {
|
||||||
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Auto) => {
|
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Auto) => {
|
||||||
|
|
|
@ -31,7 +31,6 @@ fn foo<T, E>(a: T, b: E) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo<T: Send, E: Send>(a: T, b: E) {
|
fn foo<T: Send, E: Send>(a: T, b: E) {
|
||||||
|
|
||||||
foo::<u32, str>(10, "bar");
|
foo::<u32, str>(10, "bar");
|
||||||
|
|
||||||
let opt: Option<u32>;
|
let opt: Option<u32>;
|
||||||
|
|
|
@ -14,7 +14,6 @@ struct TupleStruct2(u32, u32);
|
||||||
fn fooEmpty() {}
|
fn fooEmpty() {}
|
||||||
|
|
||||||
fn foo(e: E, _: u32) -> (u32, u32) {
|
fn foo(e: E, _: u32) -> (u32, u32) {
|
||||||
|
|
||||||
// Tuples
|
// Tuples
|
||||||
let t1 = ();
|
let t1 = ();
|
||||||
let t2 = (1,);
|
let t2 = (1,);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// rustfmt-spaces_within_square_brackets: true
|
// rustfmt-spaces_within_square_brackets: true
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
||||||
let arr: [i32; 5] = [1, 2, 3, 4, 5];
|
let arr: [i32; 5] = [1, 2, 3, 4, 5];
|
||||||
let arr: [i32; 500] = [0; 500];
|
let arr: [i32; 500] = [0; 500];
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
// rustfmt-error_on_line_overflow: false
|
// rustfmt-error_on_line_overflow: false
|
||||||
// rustfmt-struct_lit_style: Visual
|
// rustfmt-struct_lit_style: Visual
|
||||||
fn foo() {
|
fn foo() {
|
||||||
|
|
||||||
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
|
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
|
||||||
|
|
||||||
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(// Comment
|
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(// Comment
|
||||||
|
@ -35,5 +34,4 @@ fn foo() {
|
||||||
// /|\ \
|
// /|\ \
|
||||||
// o o o o
|
// o o o o
|
||||||
G)
|
G)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,5 +96,4 @@ pub fn waltz(cwd: &Path) -> CliAssert {
|
||||||
rewrite_comment(comment, block_style, width, offset, formatting_fig);
|
rewrite_comment(comment, block_style, width, offset, formatting_fig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,5 +23,4 @@ fn main() {
|
||||||
},
|
},
|
||||||
_ => "something else",
|
_ => "something else",
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
|
||||||
block: &mut BlockFlow,
|
block: &mut BlockFlow,
|
||||||
input: &ISizeConstraintInput,
|
input: &ISizeConstraintInput,
|
||||||
) -> ISizeConstraintSolution {
|
) -> ISizeConstraintSolution {
|
||||||
|
|
||||||
let (inline_start, inline_size, margin_inline_start, margin_inline_end) = match (
|
let (inline_start, inline_size, margin_inline_start, margin_inline_end) = match (
|
||||||
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,
|
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,
|
||||||
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,
|
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,
|
||||||
|
|
|
@ -31,7 +31,6 @@ fn foo< T, E >(a: T, b: E) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo< T: Send, E: Send >(a: T, b: E) {
|
fn foo< T: Send, E: Send >(a: T, b: E) {
|
||||||
|
|
||||||
foo::< u32, str >(10, "bar");
|
foo::< u32, str >(10, "bar");
|
||||||
|
|
||||||
let opt: Option< u32 >;
|
let opt: Option< u32 >;
|
||||||
|
|
|
@ -14,7 +14,6 @@ struct TupleStruct2( u32, u32 );
|
||||||
fn fooEmpty() {}
|
fn fooEmpty() {}
|
||||||
|
|
||||||
fn foo( e: E, _: u32 ) -> ( u32, u32 ) {
|
fn foo( e: E, _: u32 ) -> ( u32, u32 ) {
|
||||||
|
|
||||||
// Tuples
|
// Tuples
|
||||||
let t1 = ();
|
let t1 = ();
|
||||||
let t2 = ( 1, );
|
let t2 = ( 1, );
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// rustfmt-spaces_within_square_brackets: true
|
// rustfmt-spaces_within_square_brackets: true
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
||||||
let arr: [ i32; 5 ] = [ 1, 2, 3, 4, 5 ];
|
let arr: [ i32; 5 ] = [ 1, 2, 3, 4, 5 ];
|
||||||
let arr: [ i32; 500 ] = [ 0; 500 ];
|
let arr: [ i32; 500 ] = [ 0; 500 ];
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
// rustfmt-error_on_line_overflow: false
|
// rustfmt-error_on_line_overflow: false
|
||||||
// rustfmt-struct_lit_style: Visual
|
// rustfmt-struct_lit_style: Visual
|
||||||
fn foo() {
|
fn foo() {
|
||||||
|
|
||||||
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
|
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
|
||||||
|
|
||||||
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
|
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
|
||||||
|
@ -45,5 +44,4 @@ fn foo() {
|
||||||
// o o o o
|
// o o o o
|
||||||
G,
|
G,
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue