Merge branch 'master' into feature/panes-widget

This commit is contained in:
Héctor Ramón Jiménez 2020-03-10 06:12:06 +01:00
commit e4fbca59b4
15 changed files with 231 additions and 94 deletions

View file

@ -20,7 +20,7 @@ impl Limits {
///
/// [`Limits`]: struct.Limits.html
/// [`Size`]: ../struct.Size.html
pub fn new(min: Size, max: Size) -> Limits {
pub const fn new(min: Size, max: Size) -> Limits {
Limits {
min,
max,

View file

@ -12,7 +12,7 @@ impl Node {
///
/// [`Node`]: struct.Node.html
/// [`Size`]: ../struct.Size.html
pub fn new(size: Size) -> Self {
pub const fn new(size: Size) -> Self {
Self::with_children(size, Vec::new())
}
@ -20,7 +20,7 @@ impl Node {
///
/// [`Node`]: struct.Node.html
/// [`Size`]: ../struct.Size.html
pub fn with_children(size: Size, children: Vec<Node>) -> Self {
pub const fn with_children(size: Size, children: Vec<Node>) -> Self {
Node {
bounds: Rectangle {
x: 0.0,