remove unwarp on adt name
This commit is contained in:
parent
c735b979ed
commit
2137bdfca3
@ -137,10 +137,12 @@ pub(super) fn add_call_parens<'b>(
|
||||
}
|
||||
None => {
|
||||
let name = match param.ty().as_adt() {
|
||||
Some(adt) => {
|
||||
to_lower_snake_case(&adt.name(ctx.db).as_text().unwrap())
|
||||
}
|
||||
None => "_".to_string(),
|
||||
Some(adt) => adt
|
||||
.name(ctx.db)
|
||||
.as_text()
|
||||
.map(to_lower_snake_case)
|
||||
.unwrap_or("_".to_string()),
|
||||
};
|
||||
f(&format_args!("${{{}:{}}}", index + offset, name))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user