feat(setter): remove old trait

Trait TextViewSetters has been removed as there is already an analogue
of this trait in existence
This commit is contained in:
doryan 2024-08-14 19:01:34 +04:00
parent 7282045c98
commit 7116b565de

View File

@ -23,7 +23,6 @@ pub enum MarginData {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
pub struct Size { pub struct Size {
pub width: i32, pub width: i32,
pub height: i32, pub height: i32,
@ -44,27 +43,6 @@ pub trait Setters {
fn set_align(self, align: Alignment) -> Self; fn set_align(self, align: Alignment) -> Self;
} }
pub trait TextViewSetters {
fn set_text_view_margin(self, margin: MarginData) -> Self;
}
impl TextViewSetters for TextViewBuilder {
fn set_text_view_margin(self, margin: MarginData) -> Self {
match margin {
MarginData::EqualsMargin(margin) => self
.top_margin(margin)
.left_margin(margin)
.bottom_margin(margin)
.right_margin(margin),
MarginData::MultipleMargin(margins) => self
.top_margin(margins.0)
.left_margin(margins.1)
.bottom_margin(margins.2)
.right_margin(margins.3),
}
}
}
/** /**
* Macros * Macros
*/ */