Remove counterintuitive constant functions

This commit is contained in:
Héctor Ramón Jiménez 2020-03-06 03:30:48 +01:00
parent 267e242238
commit f81827c151
14 changed files with 52 additions and 55 deletions

View file

@ -32,7 +32,7 @@ impl Limits {
///
/// [`Limits`]: struct.Limits.html
/// [`Size`]: ../struct.Size.html
pub const fn min(&self) -> Size {
pub fn min(&self) -> Size {
self.min
}
@ -40,7 +40,7 @@ impl Limits {
///
/// [`Limits`]: struct.Limits.html
/// [`Size`]: ../struct.Size.html
pub const fn max(&self) -> Size {
pub fn max(&self) -> Size {
self.max
}

View file

@ -36,14 +36,14 @@ impl Node {
///
/// [`Node`]: struct.Node.html
/// [`Size`]: ../struct.Size.html
pub const fn size(&self) -> Size {
pub fn size(&self) -> Size {
Size::new(self.bounds.width, self.bounds.height)
}
/// Returns the bounds of the [`Node`].
///
/// [`Node`]: struct.Node.html
pub const fn bounds(&self) -> Rectangle {
pub fn bounds(&self) -> Rectangle {
self.bounds
}