about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-05-26 10:35:24 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-05-27 08:26:50 +1000
commit8dde6d53495c5a2dd745553898327b840172444f (patch)
tree780386af5b39215c14213866c28d6d8048c3cbc0 /compiler/rustc_interface/src/errors.rs
parent4f1f1a2b57ae9dccca4af131def547bf1106f582 (diff)
downloadrust-8dde6d53495c5a2dd745553898327b840172444f.tar.gz
rust-8dde6d53495c5a2dd745553898327b840172444f.zip
Streamline `TypeAliasPart::get`.
- `ret` only ever gets at most one entry, so it can be an `Option`
  instead of a `Vec`.
- Which means we can use `filter_map` instead of `flat_map`.
- Move `trait_` next to the `ret` assignment, which can only happen
  once.
- No need for `impls` to be a `Vec`, it can remain an iterator.
- Avoid `Result` when collecting `impls`.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions