Fix a bunch of clippy lints

This commit is contained in:
Johannes Linke 2016-01-02 16:51:01 +01:00
parent b1ca3d1cdf
commit 6b215f38ee
58 changed files with 281 additions and 356 deletions

View file

@ -38,15 +38,12 @@ fn text(fragments: &LinkedList<Fragment>) -> String {
let mut text = String::new();
for fragment in fragments {
match fragment.specific {
SpecificFragmentInfo::UnscannedText(ref info) => {
if fragment.white_space().preserve_newlines() {
text.push_str(&info.text);
} else {
text.push_str(&info.text.replace("\n", " "));
}
if let SpecificFragmentInfo::UnscannedText(ref info) = fragment.specific {
if fragment.white_space().preserve_newlines() {
text.push_str(&info.text);
} else {
text.push_str(&info.text.replace("\n", " "));
}
_ => {}
}
}
text