mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Remove unnecessary Option
This commit is contained in:
parent
efb56160c9
commit
d223c28c7d
3 changed files with 10 additions and 5 deletions
|
@ -2880,7 +2880,12 @@ impl Type {
|
|||
})
|
||||
.build();
|
||||
|
||||
db.normalize_projection(projection, self.env.clone()).map(|ty| self.derived(ty))
|
||||
let ty = db.normalize_projection(projection, self.env.clone());
|
||||
if ty.is_unknown() {
|
||||
None
|
||||
} else {
|
||||
Some(self.derived(ty))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_copy(&self, db: &dyn HirDatabase) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue