Merge pull request #1421 from apatniv/clippy_use_single_char
clippy: use char instead of str
This commit is contained in:
commit
87d2cd9845
|
@ -366,7 +366,7 @@ impl HtmlHandlebars {
|
||||||
// Note: all paths are relative to the build directory, so the
|
// Note: all paths are relative to the build directory, so the
|
||||||
// leading slash in an absolute path means nothing (and would mess
|
// leading slash in an absolute path means nothing (and would mess
|
||||||
// up `root.join(original)`).
|
// up `root.join(original)`).
|
||||||
let original = original.trim_start_matches("/");
|
let original = original.trim_start_matches('/');
|
||||||
let filename = root.join(original);
|
let filename = root.join(original);
|
||||||
self.emit_redirect(handlebars, &filename, new)?;
|
self.emit_redirect(handlebars, &filename, new)?;
|
||||||
}
|
}
|
||||||
|
@ -899,10 +899,10 @@ fn partition_source(s: &str) -> (String, String) {
|
||||||
if !header || after_header {
|
if !header || after_header {
|
||||||
after_header = true;
|
after_header = true;
|
||||||
after.push_str(line);
|
after.push_str(line);
|
||||||
after.push_str("\n");
|
after.push('\n');
|
||||||
} else {
|
} else {
|
||||||
before.push_str(line);
|
before.push_str(line);
|
||||||
before.push_str("\n");
|
before.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ pub fn take_rustdoc_include_lines<R: RangeBounds<usize>>(s: &str, range: R) -> S
|
||||||
output.push_str("# ");
|
output.push_str("# ");
|
||||||
}
|
}
|
||||||
output.push_str(line);
|
output.push_str(line);
|
||||||
output.push_str("\n");
|
output.push('\n');
|
||||||
}
|
}
|
||||||
output.pop();
|
output.pop();
|
||||||
output
|
output
|
||||||
|
@ -95,7 +95,7 @@ pub fn take_rustdoc_include_anchored_lines(s: &str, anchor: &str) -> String {
|
||||||
None => {
|
None => {
|
||||||
if !ANCHOR_START.is_match(l) {
|
if !ANCHOR_START.is_match(l) {
|
||||||
output.push_str(l);
|
output.push_str(l);
|
||||||
output.push_str("\n");
|
output.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ pub fn take_rustdoc_include_anchored_lines(s: &str, anchor: &str) -> String {
|
||||||
} else if !ANCHOR_END.is_match(l) {
|
} else if !ANCHOR_END.is_match(l) {
|
||||||
output.push_str("# ");
|
output.push_str("# ");
|
||||||
output.push_str(l);
|
output.push_str(l);
|
||||||
output.push_str("\n");
|
output.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl TomlExt for Value {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn split(key: &str) -> Option<(&str, &str)> {
|
fn split(key: &str) -> Option<(&str, &str)> {
|
||||||
let ix = key.find(".")?;
|
let ix = key.find('.')?;
|
||||||
|
|
||||||
let (head, tail) = key.split_at(ix);
|
let (head, tail) = key.split_at(ix);
|
||||||
// splitting will leave the "."
|
// splitting will leave the "."
|
||||||
|
|
Loading…
Reference in New Issue