chore: fix type variance bug

This commit is contained in:
Shunsuke Shibayama 2024-01-28 23:12:48 +09:00
parent ccb54e0115
commit 6b5af0ffb4
3 changed files with 56 additions and 2 deletions

View file

@ -286,6 +286,12 @@ impl std::ops::Mul for Variance {
}
}
impl Variance {
pub const fn is_invariant(&self) -> bool {
matches!(self, Variance::Invariant)
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ParamSpec {
pub(crate) name: Option<Str>,