about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-05-23 15:35:32 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-05-24 07:31:37 +1000
commita7baf4bce491b50ec30c38895d5c1ec296c23ab5 (patch)
treeb79997fd58922a9dc1bb0b39a96adf5a6c718f37 /src/librustdoc/html
parente88e85463468ce5d5ce468414eb69e3b15fa8d42 (diff)
downloadrust-a7baf4bce491b50ec30c38895d5c1ec296c23ab5.tar.gz
rust-a7baf4bce491b50ec30c38895d5c1ec296c23ab5.zip
Simplify the "is some" test in `TypeAliasPart::get`.
The comparison against `text` seems to be unnecessary.
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/write_shared.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs
index b2bbf4614bf..fdeb4bc1f3e 100644
--- a/src/librustdoc/html/render/write_shared.rs
+++ b/src/librustdoc/html/render/write_shared.rs
@@ -653,7 +653,7 @@ impl TypeAliasPart {
                         )
                         .to_string();
                         let type_alias_fqp = (*type_alias_fqp).iter().join("::");
-                        if Some(&text) == ret.last().map(|s: &AliasSerializableImpl| &s.text) {
+                        if ret.last().map(|s: &AliasSerializableImpl| &s.text).is_some() {
                             ret.last_mut()
                                 .expect("already established that ret.last() is Some()")
                                 .aliases