rustfmt the recent change

This commit is contained in:
Sylvestre Ledru 2021-07-04 13:01:31 +02:00
parent e4204fcf07
commit 1136221f6f
2 changed files with 6 additions and 7 deletions

View file

@ -349,12 +349,10 @@ impl<'a> Pager<'a> {
let status = format!("--More--({})", status_inner); let status = format!("--More--({})", status_inner);
let banner = match (self.silent, wrong_key) { let banner = match (self.silent, wrong_key) {
(true, Some(key)) => { (true, Some(key)) => format!(
format!( "{} [Unknown key: '{}'. Press 'h' for instructions. (unimplemented)]",
"{} [Unknown key: '{}'. Press 'h' for instructions. (unimplemented)]", status, key
status, key ),
)
}
(true, None) => format!("{}[Press space to continue, 'q' to quit.]", status), (true, None) => format!("{}[Press space to continue, 'q' to quit.]", status),
(false, Some(_)) => format!("{}{}", status, BELL), (false, Some(_)) => format!("{}{}", status, BELL),
(false, None) => status, (false, None) => status,

View file

@ -262,7 +262,8 @@ fn test_bad_utf8() {
#[test] #[test]
fn test_bad_utf8_lines() { fn test_bad_utf8_lines() {
let input: &[u8] = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf"; let input: &[u8] =
b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf";
let output = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\n"; let output = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\n";
new_ucmd!() new_ucmd!()
.args(&["-n", "2"]) .args(&["-n", "2"])