Remove hash_layout method from Widget trait

This commit is contained in:
Héctor Ramón Jiménez 2022-02-22 14:10:49 +07:00
parent 9fe5080153
commit 1313c94e3b
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
35 changed files with 105 additions and 636 deletions

View file

@ -4,7 +4,7 @@ use crate::event::{self, Event};
use crate::layout;
use crate::mouse;
use crate::renderer;
use crate::{Clipboard, Hasher, Layout, Point, Rectangle, Shell, Size, Vector};
use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size, Vector};
/// A generic [`Overlay`].
#[allow(missing_debug_implementations)]
@ -100,11 +100,6 @@ where
) {
self.overlay.draw(renderer, style, layout, cursor_position)
}
/// Computes the _layout_ hash of the [`Element`].
pub fn hash_layout(&self, state: &mut Hasher) {
self.overlay.hash_layout(state, self.position);
}
}
struct Map<'a, A, B, Renderer> {
@ -184,8 +179,4 @@ where
) {
self.content.draw(renderer, style, layout, cursor_position)
}
fn hash_layout(&self, state: &mut Hasher, position: Point) {
self.content.hash_layout(state, position);
}
}