use inline format args (clippy::uninlined_format_args)
This commit is contained in:
parent
fa744071f8
commit
dcae0a4c2e
3 changed files with 12 additions and 14 deletions
|
|
@ -43,6 +43,6 @@ pub fn localize() {
|
|||
let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages();
|
||||
|
||||
if let Err(error) = localizer.select(&requested_languages) {
|
||||
eprintln!("Error while loading language for App List {}", error);
|
||||
eprintln!("Error while loading language for App List {error}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
src/main.rs
10
src/main.rs
|
|
@ -75,7 +75,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
Ok(fork::Fork::Child) => (),
|
||||
Ok(fork::Fork::Parent(_child_pid)) => process::exit(0),
|
||||
Err(err) => {
|
||||
eprintln!("failed to daemonize: {:?}", err);
|
||||
eprintln!("failed to daemonize: {err:?}");
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
|
@ -656,7 +656,7 @@ impl App {
|
|||
hash = short_hash.as_str(),
|
||||
date = date
|
||||
))
|
||||
.on_press(Message::LaunchUrl(format!("{}/commits/{}", repository, hash)))
|
||||
.on_press(Message::LaunchUrl(format!("{repository}/commits/{hash}")))
|
||||
.padding(0)
|
||||
.into(),
|
||||
])
|
||||
|
|
@ -1341,7 +1341,7 @@ impl Application for App {
|
|||
let mut font_size_names = Vec::new();
|
||||
let mut font_sizes = Vec::new();
|
||||
for font_size in 4..=32 {
|
||||
font_size_names.push(format!("{}px", font_size));
|
||||
font_size_names.push(format!("{font_size}px"));
|
||||
font_sizes.push(font_size);
|
||||
}
|
||||
|
||||
|
|
@ -1597,7 +1597,7 @@ impl Application for App {
|
|||
Ok(ok) => ok,
|
||||
Err(err) => {
|
||||
self.color_scheme_errors
|
||||
.push(format!("Failed to open {:?}: {}", path, err));
|
||||
.push(format!("Failed to open {path:?}: {err}"));
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
|
@ -1616,7 +1616,7 @@ impl Application for App {
|
|||
}
|
||||
Err(err) => {
|
||||
self.color_scheme_errors
|
||||
.push(format!("Failed to parse {:?}: {}", path, err));
|
||||
.push(format!("Failed to parse {path:?}: {err}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -698,8 +698,7 @@ where
|
|||
match named {
|
||||
Named::Backspace => {
|
||||
let code = if modifiers.control() { "\x08" } else { "\x7f" };
|
||||
terminal
|
||||
.input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec());
|
||||
terminal.input_scroll(format!("{alt_prefix}{code}").as_bytes().to_vec());
|
||||
status = Status::Captured;
|
||||
}
|
||||
Named::Enter => {
|
||||
|
|
@ -728,8 +727,7 @@ where
|
|||
}
|
||||
Named::Tab => {
|
||||
let code = if modifiers.shift() { "\x1b[Z" } else { "\x09" };
|
||||
terminal
|
||||
.input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec());
|
||||
terminal.input_scroll(format!("{alt_prefix}{code}").as_bytes().to_vec());
|
||||
status = Status::Captured;
|
||||
}
|
||||
_ => {}
|
||||
|
|
@ -1151,10 +1149,10 @@ fn calculate_modifier_number(state: &mut State) -> u8 {
|
|||
#[inline(always)]
|
||||
fn csi(code: &str, suffix: &str, modifiers: u8) -> Option<Vec<u8>> {
|
||||
if modifiers == 1 {
|
||||
Some(format!("\x1B[{}{}", code, suffix).as_bytes().to_vec())
|
||||
Some(format!("\x1B[{code}{suffix}").as_bytes().to_vec())
|
||||
} else {
|
||||
Some(
|
||||
format!("\x1B[{};{}{}", code, modifiers, suffix)
|
||||
format!("\x1B[{code};{modifiers}{suffix}")
|
||||
.as_bytes()
|
||||
.to_vec(),
|
||||
)
|
||||
|
|
@ -1164,8 +1162,8 @@ fn csi(code: &str, suffix: &str, modifiers: u8) -> Option<Vec<u8>> {
|
|||
#[inline(always)]
|
||||
fn ss3(code: &str, modifiers: u8) -> Option<Vec<u8>> {
|
||||
if modifiers == 1 {
|
||||
Some(format!("\x1B\x4F{}", code).as_bytes().to_vec())
|
||||
Some(format!("\x1B\x4F{code}").as_bytes().to_vec())
|
||||
} else {
|
||||
Some(format!("\x1B[1;{}{}", modifiers, code).as_bytes().to_vec())
|
||||
Some(format!("\x1B[1;{modifiers}{code}").as_bytes().to_vec())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue