Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more clippy fixes #70229

Merged
merged 7 commits into from
Mar 22, 2020
8 changes: 4 additions & 4 deletions src/librustc_span/source_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ impl SourceMap {
pub fn doctest_offset_line(&self, file: &FileName, orig: usize) -> usize {
match file {
FileName::DocTest(_, offset) => {
return if *offset >= 0 {
orig + *offset as usize
} else {
if *offset < 0 {
orig - (-(*offset)) as usize
};
} else {
orig + *offset as usize
}
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved
}
_ => orig,
}
Expand Down
4 changes: 1 addition & 3 deletions src/librustdoc/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ pub fn load_css_paths(v: &[u8]) -> CssPath {
}

pub fn get_differences(against: &CssPath, other: &CssPath, v: &mut Vec<String>) {
if against.name != other.name {
return;
} else {
if against.name == other.name {
for child in &against.children {
let mut found = false;
let mut found_working = false;
Expand Down