wip: now only need to remove 139x ratatui::layout::Rect

This commit is contained in:
🪞👃🪞 2024-09-06 23:51:33 +03:00
parent ff97070a03
commit 4b92465073
6 changed files with 84 additions and 123 deletions

View file

@ -29,7 +29,7 @@ impl<N: Number> Point<N> for [N;2] {
}
}
pub trait Rectangle<N: Number> {
pub trait Area<N: Number> {
fn x (&self) -> N;
fn y (&self) -> N;
fn w (&self) -> N;
@ -42,7 +42,7 @@ pub trait Rectangle<N: Number> {
}
}
impl<N: Number> Rectangle<N> for (N, N, N, N) {
impl<N: Number> Area<N> for (N, N, N, N) {
fn x (&self) -> N {
self.0
}
@ -57,7 +57,7 @@ impl<N: Number> Rectangle<N> for (N, N, N, N) {
}
}
impl<N: Number> Rectangle<N> for [N;4] {
impl<N: Number> Area<N> for [N;4] {
fn x (&self) -> N {
self[0]
}