forked from mars/breed
1
0
Fork 0

Make Style::print_styled() generic over Display

This commit is contained in:
mars 2023-04-12 12:40:06 -04:00
parent 11a1fa6a17
commit ce13258ca7
1 changed files with 2 additions and 2 deletions

View File

@ -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};