From 08ac763634b7953ed0a71a0d682c0c094d5d2b80 Mon Sep 17 00:00:00 2001 From: Uttarayan Date: Thu, 15 Feb 2024 18:04:01 +0530 Subject: [PATCH] [fix] Fix the tests for zero-copy version --- tests/tests.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/tests.rs b/tests/tests.rs index 897d0f1..fa7e84a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -189,13 +189,10 @@ mod zero_copy { #[test] fn test_ascii_rgb() { let bytes: Vec = b"\x1b[38;2;100;100;100mAAABBB".to_vec(); - let output = Ok(Text::styled( + let output = Ok(Text::from(Span::styled( "AAABBB", - Style { - fg: Some(Color::Rgb(100, 100, 100)), - ..Default::default() - }, - )); + Style::default().fg(Color::Rgb(100, 100, 100)), + ))); assert_eq!(bytes.to_text(), output); }