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,
}
}
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;