mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
internal: refactor generate_delegate_trait and add comments
This commit is contained in:
parent
426d2842c1
commit
bf0c4acef4
3 changed files with 141 additions and 189 deletions
|
@ -293,13 +293,12 @@ impl ast::GenericParamList {
|
|||
}
|
||||
|
||||
/// Removes the corresponding generic arg
|
||||
pub fn remove_generic_arg(&self, generic_arg: &ast::GenericArg) -> Option<GenericParam> {
|
||||
pub fn remove_generic_arg(&self, generic_arg: &ast::GenericArg) {
|
||||
let param_to_remove = self.find_generic_arg(generic_arg);
|
||||
|
||||
if let Some(param) = ¶m_to_remove {
|
||||
self.remove_generic_param(param.clone());
|
||||
}
|
||||
param_to_remove
|
||||
}
|
||||
|
||||
/// Constructs a matching [`ast::GenericArgList`]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue