diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-26 10:35:24 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-27 08:26:50 +1000 |
| commit | 8dde6d53495c5a2dd745553898327b840172444f (patch) | |
| tree | 780386af5b39215c14213866c28d6d8048c3cbc0 /compiler/rustc_interface/src/errors.rs | |
| parent | 4f1f1a2b57ae9dccca4af131def547bf1106f582 (diff) | |
| download | rust-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
