Clippy
This commit is contained in:
@@ -94,8 +94,7 @@ pub fn insert_startup_scripts(ctx: &ExecutionContext, git_repos: &mut Repositori
|
|||||||
.base_dirs()
|
.base_dirs()
|
||||||
.data_dir()
|
.data_dir()
|
||||||
.join("Microsoft\\Windows\\Start Menu\\Programs\\Startup");
|
.join("Microsoft\\Windows\\Start Menu\\Programs\\Startup");
|
||||||
for entry in std::fs::read_dir(&startup_dir)? {
|
for entry in std::fs::read_dir(&startup_dir)?.flatten() {
|
||||||
if let Ok(entry) = entry {
|
|
||||||
let path = entry.path();
|
let path = entry.path();
|
||||||
if path.extension().and_then(OsStr::to_str) == Some("lnk") {
|
if path.extension().and_then(OsStr::to_str) == Some("lnk") {
|
||||||
if let Ok(lnk) = parselnk::Lnk::try_from(Path::new(&path)) {
|
if let Ok(lnk) = parselnk::Lnk::try_from(Path::new(&path)) {
|
||||||
@@ -106,7 +105,6 @@ pub fn insert_startup_scripts(ctx: &ExecutionContext, git_repos: &mut Repositori
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user