forked from mars/breed
Make Style::print_styled() generic over Display
This commit is contained in:
parent
11a1fa6a17
commit
ce13258ca7
|
@ -17,8 +17,8 @@
|
|||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::io::Write;
|
||||
use std::{collections::HashMap, fmt::Display};
|
||||
|
||||
use crossterm::{style::Color, ExecutableCommand};
|
||||
use once_cell::sync::Lazy;
|
||||
|
@ -124,7 +124,7 @@ impl Style {
|
|||
pub fn print_styled(
|
||||
&self,
|
||||
out: &mut (impl ExecutableCommand + Write),
|
||||
content: &str,
|
||||
content: impl Display,
|
||||
) -> crossterm::Result<()> {
|
||||
use crossterm::style::{ResetColor, SetBackgroundColor, SetForegroundColor};
|
||||
|
||||
|
|
Loading…
Reference in New Issue