-
Notifications
You must be signed in to change notification settings - Fork 1.7k
internal: Make inherent_impls_in_block and trait_impls_in_block infallible #14578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
crates/hir-ty/src/chalk_db.rs
Outdated
@@ -152,7 +152,8 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> { | |||
impl_maps.into_iter().chain(block_impls).for_each(&mut f); | |||
def_blocks | |||
.into_iter() | |||
.filter_map(|it| self.db.trait_impls_in_block(it?)) | |||
.filter_map(|it| it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can never remember if the preferred idiom is .filter_map(|it| it)
or .flat_map(|it| it)
or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.flatten()
should work here as well I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to .flatten()
.
95e2222
to
febd506
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Fixes #14574 (comment)