mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
minor: address nit
This commit is contained in:
parent
03c5dd1252
commit
c53412046f
@ -228,7 +228,7 @@ fn should_add_parens(ctx: &CompletionContext) -> bool {
|
||||
}
|
||||
|
||||
fn detail(db: &dyn HirDatabase, func: hir::Function) -> String {
|
||||
let ret_ty = func.async_ret_type(db).unwrap_or_else(|| func.ret_type(db));
|
||||
let mut ret_ty = func.ret_type(db);
|
||||
let mut detail = String::new();
|
||||
|
||||
if func.is_const(db) {
|
||||
@ -236,6 +236,9 @@ fn detail(db: &dyn HirDatabase, func: hir::Function) -> String {
|
||||
}
|
||||
if func.is_async(db) {
|
||||
format_to!(detail, "async ");
|
||||
if let Some(async_ret) = func.async_ret_type(db) {
|
||||
ret_ty = async_ret;
|
||||
}
|
||||
}
|
||||
if func.is_unsafe_to_call(db) {
|
||||
format_to!(detail, "unsafe ");
|
||||
|
Loading…
Reference in New Issue
Block a user