trait IntoPadded -> trait Padded

I have no idea what was going through my mind while naming this.
This commit is contained in:
TheOddGarlic 2022-05-22 13:53:16 +03:00
parent 098a0b6df8
commit dbf64e8b7f
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ pub mod prelude {
pub use crate::event::window::Event as WindowEvent; pub use crate::event::window::Event as WindowEvent;
pub use crate::platform::Platform; pub use crate::platform::Platform;
pub use crate::widget::Column; pub use crate::widget::Column;
pub use crate::widget::IntoPadded; pub use crate::widget::Padded;
pub use crate::widget::Label; pub use crate::widget::Label;
pub use crate::widget::Row; pub use crate::widget::Row;
pub use crate::widget::Padding; pub use crate::widget::Padding;

View file

@ -52,7 +52,7 @@ impl<W: Widget> Padding<W> {
} }
} }
pub trait IntoPadded<W: Widget> { pub trait Padded<W: Widget> {
fn padding(self, left: u32, right: u32, top: u32, bottom: u32) -> Padding<W>; fn padding(self, left: u32, right: u32, top: u32, bottom: u32) -> Padding<W>;
fn padding_x(self, left: u32, right: u32) -> Padding<W>; fn padding_x(self, left: u32, right: u32) -> Padding<W>;
fn padding_y(self, top: u32, bottom: u32) -> Padding<W>; fn padding_y(self, top: u32, bottom: u32) -> Padding<W>;
@ -63,7 +63,7 @@ pub trait IntoPadded<W: Widget> {
fn padding_all(self, padding: u32) -> Padding<W>; fn padding_all(self, padding: u32) -> Padding<W>;
} }
impl<W: Widget> IntoPadded<W> for W { impl<W: Widget> Padded<W> for W {
fn padding(self, left: u32, right: u32, top: u32, bottom: u32) -> Padding<W> { fn padding(self, left: u32, right: u32, top: u32, bottom: u32) -> Padding<W> {
Padding::new(left, right, top, bottom, self) Padding::new(left, right, top, bottom, self)
} }