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