Skip to content

Commit b4ae7d3

Browse files
committed
chore: fmt
1 parent 9c65cd6 commit b4ae7d3

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

packages/tools/src/bin/link2print.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ fn write_md(output: &str) {
2626
fn parse_references(buffer: &str) -> (String, HashMap<String, String>) {
2727
let mut ref_map = HashMap::new();
2828
// FIXME: currently doesn't handle "title" in following line.
29-
let re = Regex::new(r"(?m)\n?^ {0,3}\[([^]]+)\]:[[:blank:]]*(.*)$")
30-
.unwrap();
29+
let re =
30+
Regex::new(r"(?m)\n?^ {0,3}\[([^]]+)\]:[[:blank:]]*(.*)$").unwrap();
3131
let output = re
3232
.replace_all(buffer, |caps: &Captures<'_>| {
3333
let key_def = caps.get(1).unwrap().as_str();
3434
let key = key_def.to_uppercase();
3535
let val = caps.get(2).unwrap().as_str().to_string();
3636

37-
assert!(ref_map.insert(key, val).is_none(), "unexpected page had duplicate reference for {key_def}");
38-
37+
assert!(
38+
ref_map.insert(key, val).is_none(),
39+
"unexpected page had duplicate reference for {key_def}"
40+
);
3941

4042
String::new()
4143
})
@@ -165,8 +167,7 @@ more text";
165167

166168
#[test]
167169
fn parses_title_with_puctuation() {
168-
let source =
169-
r###"[link](http://example.com "It's Title")"###;
170+
let source = r###"[link](http://example.com "It's Title")"###;
170171
let target = r"link at *http://example.com*".to_string();
171172
assert_eq!(parse(source), target);
172173
}

packages/tools/src/bin/remove_markup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn remove_markup(input: &str) -> String {
3030

3131
#[allow(clippy::unnecessary_filter_map)]
3232
let lines: Vec<_> = input
33-
.lines()
33+
.lines()
3434
.filter_map(|line| {
3535
// Remove our syntax highlighting and rustdoc markers.
3636
if line.starts_with("```") {

0 commit comments

Comments
 (0)