Skip to content

Commit 53e8fec

Browse files
committed
chore: clippy & fmt
1 parent acbca9d commit 53e8fec

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub const IDM_STARTUP: u32 = 2;
3939
pub const IDM_CONFIGURE: u32 = 3;
4040

4141
pub fn start(config: &Config) -> Result<()> {
42-
info!("start config={:?}", config);
42+
info!("start config={config:?}");
4343
App::start(config)
4444
}
4545

src/utils/scheduled_task.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use windows::Win32::{
2424
pub fn create_scheduled_task(name: &str, exe_path: &str) -> Result<()> {
2525
let task_xml_path = create_task_file(name, exe_path)
2626
.map_err(|err| anyhow!("Failed to create scheduled task, {err}"))?;
27-
debug!("scheduled task file: {}", task_xml_path);
27+
debug!("scheduled task file: {task_xml_path}");
2828
let output = Command::new("schtasks")
2929
.creation_flags(CREATE_NO_WINDOW.0) // CREATE_NO_WINDOW flag
3030
.args(["/create", "/tn", name, "/xml", &task_xml_path, "/f"])
@@ -69,7 +69,7 @@ fn create_task_file(name: &str, exe_path: &str) -> Result<String> {
6969
.map_err(|err| anyhow!("Failed to get author and user id, {err}"))?;
7070
let current_time = get_current_time();
7171
let command_path = if exe_path.contains(|c: char| c.is_whitespace()) {
72-
format!("\"{}\"", exe_path)
72+
format!("\"{exe_path}\"")
7373
} else {
7474
exe_path.to_string()
7575
};
@@ -200,7 +200,7 @@ fn get_author_and_userid() -> WindowsResult<(String, String)> {
200200
.to_string_lossy()
201201
.into_owned();
202202

203-
Ok((format!("{}\\{}", domainname, username), sid_str))
203+
Ok((format!("{domainname}\\{username}"), sid_str))
204204
}
205205

206206
fn get_current_time() -> String {

src/utils/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub fn list_windows(
253253
result.entry(module_path).or_default().push((hwnd, title));
254254
}
255255
}
256-
debug!("list windows {:?}", result);
256+
debug!("list windows {result:?}");
257257
Ok(result)
258258
}
259259

0 commit comments

Comments
 (0)