needless_return

This commit is contained in:
Johann Hemmann 2024-01-19 15:41:23 +01:00
parent 6699c90788
commit e58b683201
2 changed files with 3 additions and 4 deletions

View file

@ -176,7 +176,6 @@ forget_non_drop = "allow"
format_collect = "allow"
large_enum_variant = "allow"
needless_doctest_main = "allow"
needless_return = "allow"
new_without_default = "allow"
nonminimal_bool = "allow"
non_canonical_clone_impl = "allow"

View file

@ -2404,10 +2404,10 @@ impl Const {
}
}
if let Ok(s) = mir::render_const_using_debug_impl(db, self.id, &c) {
return Ok(s);
Ok(s)
} else {
Ok(format!("{}", c.display(db)))
}
let r = format!("{}", c.display(db));
return Ok(r);
}
}