internal: intern TypeBounds
Doesn't save much memory (~2 mb), but interning things is generally a good pattern to follow
This commit is contained in:
@@ -92,7 +92,7 @@ impl HirDisplay for Function {
|
||||
&data.ret_type
|
||||
} else {
|
||||
match &*data.ret_type {
|
||||
TypeRef::ImplTrait(bounds) => match &bounds[0] {
|
||||
TypeRef::ImplTrait(bounds) => match bounds[0].as_ref() {
|
||||
TypeBound::Path(path) => {
|
||||
path.segments().iter().last().unwrap().args_and_bindings.unwrap().bindings
|
||||
[0]
|
||||
|
||||
Reference in New Issue
Block a user