INNER CODE UNIT · Rust
eq
autopilot-rs/autopilot-rs · src/bitmap.rs:48
fn eq(&self, other: &Bitmap) -> bool {
self.bitmap_eq(other, None)
}
}
impl std::hash::Hash for Bitmap {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
if let Some(rgb_image) = self.image.as_rgba8() {
rgb_image.hash(state);
}
self.size.hash(state);
(self.scale as i64).hash(state);
}
}
impl Bitmap {
#[inline]
/// Creates a bitmap from the given `DynamicImage`, and scale if given