Skip to content

Commit e58b683

Browse files
committed
needless_return
1 parent 6699c90 commit e58b683

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ forget_non_drop = "allow"
176176
format_collect = "allow"
177177
large_enum_variant = "allow"
178178
needless_doctest_main = "allow"
179-
needless_return = "allow"
180179
new_without_default = "allow"
181180
nonminimal_bool = "allow"
182181
non_canonical_clone_impl = "allow"

crates/hir/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,10 +2404,10 @@ impl Const {
24042404
}
24052405
}
24062406
if let Ok(s) = mir::render_const_using_debug_impl(db, self.id, &c) {
2407-
return Ok(s);
2407+
Ok(s)
2408+
} else {
2409+
Ok(format!("{}", c.display(db)))
24082410
}
2409-
let r = format!("{}", c.display(db));
2410-
return Ok(r);
24112411
}
24122412
}
24132413

0 commit comments

Comments
 (0)