mirror of
https://github.com/openharmony/third_party_rust_cxx.git
synced 2026-07-01 05:39:22 -04:00
32 lines
592 B
Rust
32 lines
592 B
Rust
use crate::syntax::{Ref, Ty1};
|
|
use std::hash::{Hash, Hasher};
|
|
|
|
impl Eq for Ty1 {}
|
|
|
|
impl PartialEq for Ty1 {
|
|
fn eq(&self, other: &Ty1) -> bool {
|
|
self.name == other.name && self.inner == other.inner
|
|
}
|
|
}
|
|
|
|
impl Hash for Ty1 {
|
|
fn hash<H: Hasher>(&self, state: &mut H) {
|
|
self.name.hash(state);
|
|
self.inner.hash(state);
|
|
}
|
|
}
|
|
|
|
impl Eq for Ref {}
|
|
|
|
impl PartialEq for Ref {
|
|
fn eq(&self, other: &Ref) -> bool {
|
|
self.inner == other.inner
|
|
}
|
|
}
|
|
|
|
impl Hash for Ref {
|
|
fn hash<H: Hasher>(&self, state: &mut H) {
|
|
self.inner.hash(state);
|
|
}
|
|
}
|