Skip to content

Commit

Permalink
remove redundant returns (clippy::needless_return)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Mar 21, 2020
1 parent 1dcbdbd commit 5566a1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/librustc_span/source_map.rs
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
}
}
_ => orig,
}
Expand Down
4 changes: 1 addition & 3 deletions src/librustdoc/theme.rs
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

0 comments on commit 5566a1c

Please sign in to comment.