mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
fix clippy and unittest
This commit is contained in:
parent
3ff77e0669
commit
779b2d572f
1 changed files with 8 additions and 5 deletions
|
|
@ -170,7 +170,7 @@ impl TextInputComponent {
|
||||||
txt = text_append(
|
txt = text_append(
|
||||||
txt,
|
txt,
|
||||||
Text::styled(
|
Text::styled(
|
||||||
substitute.clone(),
|
substitute.to_owned(),
|
||||||
self.theme
|
self.theme
|
||||||
.text(false, false)
|
.text(false, false)
|
||||||
.add_modifier(Modifier::UNDERLINED),
|
.add_modifier(Modifier::UNDERLINED),
|
||||||
|
|
@ -413,8 +413,8 @@ mod tests {
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
let theme = SharedTheme::default();
|
let theme = SharedTheme::default();
|
||||||
let underlined = theme
|
let underlined_whitespace = theme
|
||||||
.text(true, false)
|
.text(false, false)
|
||||||
.add_modifier(Modifier::UNDERLINED);
|
.add_modifier(Modifier::UNDERLINED);
|
||||||
|
|
||||||
let not_underlined = Style::default();
|
let not_underlined = Style::default();
|
||||||
|
|
@ -430,8 +430,11 @@ mod tests {
|
||||||
get_style(&txt.lines[0].0[0]),
|
get_style(&txt.lines[0].0[0]),
|
||||||
Some(¬_underlined)
|
Some(¬_underlined)
|
||||||
);
|
);
|
||||||
assert_eq!(get_text(&txt.lines[0].0[1]), Some(" "));
|
assert_eq!(get_text(&txt.lines[0].0[1]), Some("\u{00B7}"));
|
||||||
assert_eq!(get_style(&txt.lines[0].0[1]), Some(&underlined));
|
assert_eq!(
|
||||||
|
get_style(&txt.lines[0].0[1]),
|
||||||
|
Some(&underlined_whitespace)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue