Reuse with_children
to remove some duplication
This commit is contained in:
parent
a146e53eb0
commit
95c8031f3d
@ -30,16 +30,7 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> {
|
||||
///
|
||||
/// [`Column`]: struct.Column.html
|
||||
pub fn new() -> Self {
|
||||
Column {
|
||||
spacing: 0,
|
||||
padding: 0,
|
||||
width: Length::Shrink,
|
||||
height: Length::Shrink,
|
||||
max_width: u32::MAX,
|
||||
max_height: u32::MAX,
|
||||
align_items: Align::Start,
|
||||
children: Vec::new(),
|
||||
}
|
||||
Self::with_children(Vec::new())
|
||||
}
|
||||
|
||||
/// Creates a [`Column`] with the given elements.
|
||||
|
@ -30,16 +30,7 @@ impl<'a, Message, Renderer> Row<'a, Message, Renderer> {
|
||||
///
|
||||
/// [`Row`]: struct.Row.html
|
||||
pub fn new() -> Self {
|
||||
Row {
|
||||
spacing: 0,
|
||||
padding: 0,
|
||||
width: Length::Shrink,
|
||||
height: Length::Shrink,
|
||||
max_width: u32::MAX,
|
||||
max_height: u32::MAX,
|
||||
align_items: Align::Start,
|
||||
children: Vec::new(),
|
||||
}
|
||||
Self::with_children(Vec::new())
|
||||
}
|
||||
|
||||
/// Creates a [`Row`] with the given elements.
|
||||
|
Loading…
Reference in New Issue
Block a user