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
|
/// [`Column`]: struct.Column.html
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Column {
|
Self::with_children(Vec::new())
|
||||||
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(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a [`Column`] with the given elements.
|
/// Creates a [`Column`] with the given elements.
|
||||||
|
@ -30,16 +30,7 @@ impl<'a, Message, Renderer> Row<'a, Message, Renderer> {
|
|||||||
///
|
///
|
||||||
/// [`Row`]: struct.Row.html
|
/// [`Row`]: struct.Row.html
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Row {
|
Self::with_children(Vec::new())
|
||||||
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(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a [`Row`] with the given elements.
|
/// Creates a [`Row`] with the given elements.
|
||||||
|
Loading…
Reference in New Issue
Block a user