Rename Padding::constrain to fit

This commit is contained in:
Héctor Ramón Jiménez 2022-11-08 03:56:05 +01:00
parent ea4b3cd6ae
commit 7476663069
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
4 changed files with 5 additions and 5 deletions

View file

@ -74,8 +74,8 @@ impl Padding {
self.left + self.right
}
/// Constrains the padding to fit between the inner & outer [`Size`]
pub fn constrain(self, inner: Size, outer: Size) -> Self {
/// Fits the [`Padding`] between the provided `inner` and `outer` [`Size`].
pub fn fit(self, inner: Size, outer: Size) -> Self {
let available = (outer - inner).max(Size::ZERO);
Padding {