Skip to content

Commit dfe8fe8

Browse files
committed
Simplify things a little more.
1 parent e01f407 commit dfe8fe8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/librustdoc/html/render/write_shared.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ impl TypeAliasPart {
611611
.impl_
612612
.values()
613613
.flat_map(|AliasedTypeImpl { impl_, type_aliases }| {
614-
let mut ret = Vec::new();
614+
let mut ret: Vec<AliasSerializableImpl> = Vec::new();
615615
let trait_ = impl_
616616
.inner_impl()
617617
.trait_
@@ -624,11 +624,8 @@ impl TypeAliasPart {
624624
cx.id_map.borrow_mut().clear();
625625
cx.deref_id_map.borrow_mut().clear();
626626
let type_alias_fqp = (*type_alias_fqp).iter().join("::");
627-
if ret.last().map(|s: &AliasSerializableImpl| &s.text).is_some() {
628-
ret.last_mut()
629-
.expect("already established that ret.last() is Some()")
630-
.aliases
631-
.push(type_alias_fqp);
627+
if let Some(last) = ret.last_mut() {
628+
last.aliases.push(type_alias_fqp);
632629
} else {
633630
let target_did = impl_
634631
.inner_impl()

0 commit comments

Comments
 (0)