diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd4106..dfe3a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - `style module` - Rename `ObjectStyle` to `ContentStyle`. Now full names are used for methods. - Rename `StyledObject` to `StyledContent` and made members private. + - Rename `PrintStyledFont` to `PrintStyledContent` - Rename `attr` method to `attribute`. - Rename `Attribute::NoInverse` to `NoReverse` diff --git a/src/lib.rs b/src/lib.rs index 3b3b807..89ff1fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ //! if (y == 0 || y == 40 - 1) || (x == 0 || x == 150 - 1) { //! stdout //! .queue(cursor::MoveTo(x,y))? -//! .queue(style::PrintStyledFont( "█".magenta()))?; +//! .queue(style::PrintStyledContent( "█".magenta()))?; //! } //! } //! } @@ -146,7 +146,7 @@ //! ```no_run //! use std::io::{stdout, Write}; //! use crossterm::{ -//! execute, queue, Color, PrintStyledFont, +//! execute, queue, Color, PrintStyledContent, //! Colorize, cursor, terminal, style, Result //! }; //! @@ -158,7 +158,7 @@ //! for y in 0..40 { //! for x in 0..150 { //! if (y == 0 || y == 40 - 1) || (x == 0 || x == 150 - 1) { -//! queue!(stdout, cursor::MoveTo(x,y), style::PrintStyledFont( "█".magenta()))?; +//! queue!(stdout, cursor::MoveTo(x,y), style::PrintStyledContent( "█".magenta()))?; //! } //! } //! } @@ -178,8 +178,8 @@ pub use screen::{ }; #[cfg(feature = "style")] pub use style::{ - color, style, Attribute, Color, Colored, Colorize, ContentStyle, PrintStyledFont, ResetColor, - SetAttr, SetBg, SetFg, StyledContent, Styler, TerminalColor, + color, style, Attribute, Color, Colored, Colorize, ContentStyle, PrintStyledContent, + ResetColor, SetAttr, SetBg, SetFg, StyledContent, Styler, TerminalColor, }; pub use utils::{Command, ErrorKind, ExecutableCommand, Output, QueueableCommand, Result}; diff --git a/src/style.rs b/src/style.rs index 47b36ae..f535bf0 100644 --- a/src/style.rs +++ b/src/style.rs @@ -372,9 +372,9 @@ impl Command for SetAttr { /// # Notes /// /// Commands must be executed/queued for execution otherwise they do nothing. -pub struct PrintStyledFont(pub StyledContent); +pub struct PrintStyledContent(pub StyledContent); -impl Command for PrintStyledFont +impl Command for PrintStyledContent where D: Display + Clone, { @@ -413,6 +413,6 @@ impl Command for ResetColor { impl_display!(for SetFg); impl_display!(for SetBg); impl_display!(for SetAttr); -impl_display!(for PrintStyledFont); -impl_display!(for PrintStyledFont<&'static str>); +impl_display!(for PrintStyledContent); +impl_display!(for PrintStyledContent<&'static str>); impl_display!(for ResetColor);