lint: fix new lints

This commit is contained in:
anatawa12 2026-04-16 23:46:33 +09:00
commit b30df5621a
No known key found for this signature in database
GPG key ID: 9CA909848B8E4EA6
7 changed files with 15 additions and 15 deletions

1
vrc-get-gui/.npmrc Normal file
View file

@ -0,0 +1 @@
ignore-scripts=true

View file

@ -56,7 +56,7 @@ pub async fn load_resolve_all_templates(
load_resolve_alcom_templates(io, unity_versions),
load_vcc_templates(io)
);
Ok(alcom.into_iter().chain(vcc.into_iter()).collect())
Ok(alcom.into_iter().chain(vcc).collect())
}
pub async fn load_vcc_templates(io: &DefaultEnvironmentIo) -> Vec<ProjectTemplateInfo> {

View file

@ -2,7 +2,9 @@ use crate::io;
use crate::io::{FileStream, FileType, IoTrait, Metadata};
use futures::{Stream, TryFutureExt};
use log::debug;
use std::ffi::{OsStr, OsString};
#[cfg(feature = "vrc-get-litedb")]
use std::ffi::OsStr;
use std::ffi::OsString;
use std::mem::forget;
use std::path::Path;
use std::path::PathBuf;

View file

@ -47,10 +47,7 @@ pub async fn load_unity_by_loading_unity_hub_files() -> Result<Vec<UnityEditorIn
)
.await?;
Ok(a.into_iter()
.chain(b.into_iter())
.chain(c.into_iter())
.collect())
Ok(a.into_iter().chain(b).chain(c).collect())
}
async fn get_custom_install_location(local_settings: &LocalSettings) -> Option<PathBuf> {

View file

@ -141,7 +141,7 @@ async fn migrate_vpm(
}
}
adding_packages.extend(curated_packages.into_iter());
adding_packages.extend(curated_packages);
}
// install packages. this also removes legacy VRCSDK and curated packages

View file

@ -63,8 +63,8 @@ impl Display for ParseVersionError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self.inner {
Inner::VersionSegmentTooBig => f.write_str("version segment too big"),
Inner::UnexpectedEnd => f.write_str("unexpected end"),
Inner::Invalid => write!(f, "invalid"),
Inner::UnexpectedEnd => f.write_str("unexpected end of version segment"),
Inner::Invalid => write!(f, "invalid version or version range"),
}
}
}

View file

@ -293,8 +293,8 @@ fn print_prompt_install(changes: &PendingProjectChanges) {
{
let mut unlocked_conflicts = changes
.conflicts()
.iter()
.flat_map(|(_, c)| c.unlocked_names())
.values()
.flat_map(|c| c.unlocked_names())
.peekable();
if unlocked_conflicts.peek().is_some() {
@ -847,8 +847,8 @@ impl Upgrade {
prompt_install(self.yes)
}
let updates = (changes.package_changes().iter())
.filter_map(|(_, x)| x.as_install())
let updates = (changes.package_changes().values())
.filter_map(|x| x.as_install())
.filter_map(|x| x.install_package())
.map(|x| (x.name().to_owned(), x.version().clone()))
.collect::<Vec<_>>();
@ -924,8 +924,8 @@ impl Downgrade {
prompt_install(self.yes)
}
let downgrades = (changes.package_changes().iter())
.filter_map(|(_, x)| x.as_install())
let downgrades = (changes.package_changes().values())
.filter_map(|x| x.as_install())
.filter_map(|x| x.install_package())
.map(|x| (x.name().to_owned(), x.version().clone()))
.collect::<Vec<_>>();