Flesh out gpui2 test support
This commit is contained in:
parent
eb325fb387
commit
8e799b6e22
7 changed files with 271 additions and 13 deletions
|
@ -25,6 +25,10 @@ impl<T: Clone + Debug + Default> Point<T> {
|
|||
Self { x, y }
|
||||
}
|
||||
|
||||
pub fn zero() -> Self {
|
||||
Self::new(T::default(), T::default())
|
||||
}
|
||||
|
||||
pub fn map<U: Clone + Default + Debug>(&self, f: impl Fn(T) -> U) -> Point<U> {
|
||||
Point {
|
||||
x: f(self.x.clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue