This commit is contained in:
lda committed 2025-01-22 10:07:54 +07:00
1 parent ff1c195036
commit 0365c2a2a2
3 files changed
+13 -14

No files matched your search

-1
View File
@@ -1,3 +1,2 @@
/target
**/*.rs.bk
.vscode
+12 -12
View File
@@ -104,24 +104,24 @@ pub fn compare2_format(str1: &str, str2: &str) -> (String, String) {
);
}
match &last_from_also_colored {
&IsColored::False(_) => {
match last_from_also_colored {
IsColored::False(_) => {
current_from.add_style(&reset);
}
&IsColored::True(_) => {
IsColored::True(_) => {
current_from.add_style(&red_text);
}
&IsColored::None => (),
IsColored::None => (),
}
froms.push(current_from);
match &last_to_also_colored {
&IsColored::False(_) => {
match last_to_also_colored {
IsColored::False(_) => {
current_to.add_style(&reset);
}
&IsColored::True(_) => {
IsColored::True(_) => {
current_to.add_style(&blue_text);
}
&IsColored::None => (),
IsColored::None => (),
}
tos.push(current_to);
let first_str: String = froms.into_iter().map(String::from).collect();
@@ -151,14 +151,14 @@ pub fn compare_mini_format<T>(
color_false,
);
};
match &last_operation_is_colored {
&IsColored::False(_) => {
match last_operation_is_colored {
IsColored::False(_) => {
current_color.add_style(color_false);
}
&IsColored::True(_) => {
IsColored::True(_) => {
current_color.add_style(color);
}
&IsColored::None => (),
IsColored::None => (),
}
text.push(current_color);
text.into_iter().map(String::from).collect()