Skip to content

Commit 0bc4f04

Browse files
committed
style: rustfmt everything
This is why I was so intent on clearing the PR queue. This will effectively invalidate all existing patches, so I wanted to start from a clean slate. We do make one little tweak: we put the default type definitions in their own file and tell rustfmt to keep its grubby mits off of it. We also sort it lexicographically and hopefully will enforce that from here on.
1 parent c95f29e commit 0bc4f04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2711
-2679
lines changed

build.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ fn main() {
2121
eprintln!(
2222
"OUT_DIR environment variable not defined. \
2323
Please file a bug: \
24-
https://github.com/BurntSushi/ripgrep/issues/new");
24+
https://github.com/BurntSushi/ripgrep/issues/new"
25+
);
2526
process::exit(1);
2627
}
2728
};
@@ -90,8 +91,10 @@ fn generate_man_page<P: AsRef<Path>>(outdir: P) -> io::Result<()> {
9091
File::create(&txt_path)?.write_all(tpl.as_bytes())?;
9192
let result = process::Command::new("a2x")
9293
.arg("--no-xmllint")
93-
.arg("--doctype").arg("manpage")
94-
.arg("--format").arg("manpage")
94+
.arg("--doctype")
95+
.arg("manpage")
96+
.arg("--format")
97+
.arg("manpage")
9598
.arg(&txt_path)
9699
.spawn()?
97100
.wait()?;
@@ -114,7 +117,7 @@ fn formatted_options() -> io::Result<String> {
114117
// ripgrep only has two positional arguments, and probably will only
115118
// ever have two positional arguments, so we just hardcode them into
116119
// the template.
117-
if let app::RGArgKind::Positional{..} = arg.kind {
120+
if let app::RGArgKind::Positional { .. } = arg.kind {
118121
continue;
119122
}
120123
formatted.push(formatted_arg(&arg)?);
@@ -124,7 +127,9 @@ fn formatted_options() -> io::Result<String> {
124127

125128
fn formatted_arg(arg: &RGArg) -> io::Result<String> {
126129
match arg.kind {
127-
RGArgKind::Positional{..} => panic!("unexpected positional argument"),
130+
RGArgKind::Positional { .. } => {
131+
panic!("unexpected positional argument")
132+
}
128133
RGArgKind::Switch { long, short, multiple } => {
129134
let mut out = vec![];
130135

@@ -163,7 +168,8 @@ fn formatted_arg(arg: &RGArg) -> io::Result<String> {
163168
}
164169

165170
fn formatted_doc_txt(arg: &RGArg) -> io::Result<String> {
166-
let paragraphs: Vec<String> = arg.doc_long
171+
let paragraphs: Vec<String> = arg
172+
.doc_long
167173
.replace("{", "&#123;")
168174
.replace("}", r"&#125;")
169175
.split("\n\n")

0 commit comments

Comments
 (0)