aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-10 15:35:35 +0900
committernsfisis <nsfisis@gmail.com>2026-05-10 15:35:35 +0900
commitdeb44112883ab7ff932b0ab7c547680a615c7821 (patch)
treea2f7f2416d8513eef064829e02689610e38760d3
parent46845eff8d1398f35099a0ef914f77bcaf473287 (diff)
downloadphp-mozart-deb44112883ab7ff932b0ab7c547680a615c7821.tar.gz
php-mozart-deb44112883ab7ff932b0ab7c547680a615c7821.tar.zst
php-mozart-deb44112883ab7ff932b0ab7c547680a615c7821.zip
refactor(clippy): deny clippy::unused_trait_names
-rw-r--r--Cargo.toml3
-rw-r--r--crates/mozart-class-map-generator/Cargo.toml3
-rw-r--r--crates/mozart-console-macros/Cargo.toml3
-rw-r--r--crates/mozart-core/Cargo.toml3
-rw-r--r--crates/mozart-core/src/console.rs4
-rw-r--r--crates/mozart-core/src/http.rs3
-rw-r--r--crates/mozart-core/src/package/archiver.rs6
-rw-r--r--crates/mozart-core/src/repository/browse_repos.rs4
-rw-r--r--crates/mozart-core/src/repository/downloader.rs8
-rw-r--r--crates/mozart-core/src/repository/installed.rs2
-rw-r--r--crates/mozart-core/src/repository/installer_executor/filesystem.rs6
-rw-r--r--crates/mozart-core/src/repository/lockfile.rs2
-rw-r--r--crates/mozart-core/src/repository/path_repository.rs4
-rw-r--r--crates/mozart-core/src/vcs/driver/github.rs2
-rw-r--r--crates/mozart-metadata-minifier/Cargo.toml3
-rw-r--r--crates/mozart-php-serialize/Cargo.toml3
-rw-r--r--crates/mozart-php-serialize/src/lib.rs2
-rw-r--r--crates/mozart-semver/Cargo.toml3
-rw-r--r--crates/mozart-spdx-licenses/Cargo.toml3
-rw-r--r--crates/mozart-test-harness/Cargo.toml3
-rw-r--r--crates/mozart-test-harness/src/parser.rs2
-rw-r--r--crates/mozart-test-harness/src/pool_builder_parser.rs2
-rw-r--r--crates/mozart-test-harness/src/runner.rs2
-rw-r--r--crates/mozart/Cargo.toml3
-rw-r--r--crates/mozart/src/commands/browse.rs2
-rw-r--r--crates/mozart/src/commands/bump.rs2
-rw-r--r--crates/mozart/src/commands/completion.rs2
-rw-r--r--crates/mozart/src/commands/diagnose.rs4
-rw-r--r--crates/mozart/src/commands/dump_autoload.rs2
-rw-r--r--crates/mozart/src/commands/exec.rs2
-rw-r--r--crates/mozart/src/commands/fund.rs2
-rw-r--r--crates/mozart/src/commands/init.rs6
-rw-r--r--crates/mozart/src/commands/install.rs2
-rw-r--r--crates/mozart/src/commands/licenses.rs4
-rw-r--r--crates/mozart/src/commands/reinstall.rs2
-rw-r--r--crates/mozart/src/commands/require.rs2
-rw-r--r--crates/mozart/src/commands/self_update.rs6
-rw-r--r--crates/mozart/src/commands/update.rs2
-rw-r--r--crates/mozart/src/main.rs4
39 files changed, 76 insertions, 47 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 1170b36..6ce6158 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -46,3 +46,6 @@ tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "fmt"] }
url = "2.5.8"
zip = { version = "2.4.2", default-features = false, features = ["deflate"] }
+
+[workspace.lints.clippy]
+unused_trait_names = "deny"
diff --git a/crates/mozart-class-map-generator/Cargo.toml b/crates/mozart-class-map-generator/Cargo.toml
index 15ae0cb..465b26c 100644
--- a/crates/mozart-class-map-generator/Cargo.toml
+++ b/crates/mozart-class-map-generator/Cargo.toml
@@ -9,3 +9,6 @@ regex.workspace = true
[dev-dependencies]
tempfile.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-console-macros/Cargo.toml b/crates/mozart-console-macros/Cargo.toml
index 19a2fe5..c4a5ebb 100644
--- a/crates/mozart-console-macros/Cargo.toml
+++ b/crates/mozart-console-macros/Cargo.toml
@@ -13,3 +13,6 @@ syn.workspace = true
[dev-dependencies]
mozart-core.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-core/Cargo.toml b/crates/mozart-core/Cargo.toml
index cca9499..199f067 100644
--- a/crates/mozart-core/Cargo.toml
+++ b/crates/mozart-core/Cargo.toml
@@ -34,3 +34,6 @@ zip.workspace = true
[dev-dependencies]
tempfile.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-core/src/console.rs b/crates/mozart-core/src/console.rs
index 3379307..ce5e271 100644
--- a/crates/mozart-core/src/console.rs
+++ b/crates/mozart-core/src/console.rs
@@ -1,6 +1,6 @@
-use colored::{ColoredString, Colorize};
+use colored::{ColoredString, Colorize as _};
use dialoguer::{Confirm, Input};
-use std::io::IsTerminal;
+use std::io::IsTerminal as _;
// ---------------------------------------------------------------------------
// Tag-style color helpers — called only by `console_format!`
diff --git a/crates/mozart-core/src/http.rs b/crates/mozart-core/src/http.rs
index 43de55d..6fed90d 100644
--- a/crates/mozart-core/src/http.rs
+++ b/crates/mozart-core/src/http.rs
@@ -1,9 +1,8 @@
use crate::MOZART_VERSION;
+use anyhow::{Context as _, Result, anyhow, bail};
use std::path::{Path, PathBuf};
use std::sync::OnceLock;
-use anyhow::{Context, Result, anyhow, bail};
-
/// Returns the common User-Agent string for all HTTP requests.
///
/// Format: `Mozart/<version> (<os>; <arch>)`
diff --git a/crates/mozart-core/src/package/archiver.rs b/crates/mozart-core/src/package/archiver.rs
index 30c678a..142edbd 100644
--- a/crates/mozart-core/src/package/archiver.rs
+++ b/crates/mozart-core/src/package/archiver.rs
@@ -1,8 +1,8 @@
use anyhow::Context as _;
use regex::Regex;
-use sha1::{Digest, Sha1};
+use sha1::{Digest as _, Sha1};
use std::fs;
-use std::io::Write as IoWrite;
+use std::io::Write as _;
use std::path::{Path, PathBuf};
pub mod manager;
@@ -340,7 +340,7 @@ fn create_zip(source_dir: &Path, files: &[PathBuf], target: &Path) -> anyhow::Re
#[cfg(unix)]
let opts = {
- use std::os::unix::fs::MetadataExt;
+ use std::os::unix::fs::MetadataExt as _;
let mode = metadata.mode();
SimpleFileOptions::default()
.compression_method(zip::CompressionMethod::Deflated)
diff --git a/crates/mozart-core/src/repository/browse_repos.rs b/crates/mozart-core/src/repository/browse_repos.rs
index 9cb8a9f..83a40f1 100644
--- a/crates/mozart-core/src/repository/browse_repos.rs
+++ b/crates/mozart-core/src/repository/browse_repos.rs
@@ -8,8 +8,8 @@
//! `CompletePackageInterface` (`getSupport()['source']`,
//! `getSourceUrl()`, `getHomepage()`).
-use super::super::package::Package;
-use super::super::package::{CompletePackage, RootPackageData};
+use super::super::package::Package as _;
+use super::super::package::{CompletePackage as _, RootPackageData};
use super::cache::Cache;
use super::installed::{InstalledPackageEntry, InstalledPackages};
use super::lockfile::LockedPackage;
diff --git a/crates/mozart-core/src/repository/downloader.rs b/crates/mozart-core/src/repository/downloader.rs
index b0d2a6a..56b3652 100644
--- a/crates/mozart-core/src/repository/downloader.rs
+++ b/crates/mozart-core/src/repository/downloader.rs
@@ -1,8 +1,8 @@
use super::cache::Cache;
use indexmap::IndexSet;
-use sha1::{Digest, Sha1};
+use sha1::{Digest as _, Sha1};
use std::fs;
-use std::io::{Cursor, Read, Write};
+use std::io::{Cursor, Read as _, Write as _};
use std::path::Path;
/// A simple download progress tracker that writes to stderr.
@@ -230,7 +230,7 @@ pub fn extract_zip(data: &[u8], target_dir: &Path) -> anyhow::Result<()> {
// Set permissions on Unix
#[cfg(unix)]
{
- use std::os::unix::fs::PermissionsExt;
+ use std::os::unix::fs::PermissionsExt as _;
if let Some(mode) = entry.unix_mode() {
fs::set_permissions(&target_path, fs::Permissions::from_mode(mode))?;
}
@@ -298,7 +298,7 @@ pub fn extract_tar_gz(data: &[u8], target_dir: &Path) -> anyhow::Result<()> {
// Set permissions on Unix
#[cfg(unix)]
{
- use std::os::unix::fs::PermissionsExt;
+ use std::os::unix::fs::PermissionsExt as _;
if let Ok(mode) = entry.header().mode() {
fs::set_permissions(&target_path, fs::Permissions::from_mode(mode))?;
}
diff --git a/crates/mozart-core/src/repository/installed.rs b/crates/mozart-core/src/repository/installed.rs
index 544e948..422f79f 100644
--- a/crates/mozart-core/src/repository/installed.rs
+++ b/crates/mozart-core/src/repository/installed.rs
@@ -111,7 +111,7 @@ impl InstalledPackages {
/// Parse an installed.json document. See [`Self::read`] for the accepted shapes.
pub fn from_json_str(content: &str) -> anyhow::Result<InstalledPackages> {
- use anyhow::{Context, anyhow};
+ use anyhow::{Context as _, anyhow};
let value: serde_json::Value =
serde_json::from_str(content).context("invalid installed.json")?;
diff --git a/crates/mozart-core/src/repository/installer_executor/filesystem.rs b/crates/mozart-core/src/repository/installer_executor/filesystem.rs
index 347f2a0..3f982e3 100644
--- a/crates/mozart-core/src/repository/installer_executor/filesystem.rs
+++ b/crates/mozart-core/src/repository/installer_executor/filesystem.rs
@@ -146,7 +146,7 @@ fn install_from_source(
let git_util =
crate::vcs::util::git::GitUtil::new(process, vendor_dir.join(".cache").join("git"));
let downloader = crate::vcs::downloader::git::GitDownloader::new(git_util);
- use crate::vcs::downloader::VcsDownloader;
+ use crate::vcs::downloader::VcsDownloader as _;
downloader.download(url, reference, &target)?;
downloader.install(url, reference, &target)?;
}
@@ -154,14 +154,14 @@ fn install_from_source(
let process = crate::vcs::process::ProcessExecutor::new();
let svn_util = crate::vcs::util::svn::SvnUtil::new(process);
let downloader = crate::vcs::downloader::svn::SvnDownloader::new(svn_util);
- use crate::vcs::downloader::VcsDownloader;
+ use crate::vcs::downloader::VcsDownloader as _;
downloader.install(url, reference, &target)?;
}
"hg" => {
let process = crate::vcs::process::ProcessExecutor::new();
let hg_util = crate::vcs::util::hg::HgUtil::new(process);
let downloader = crate::vcs::downloader::hg::HgDownloader::new(hg_util);
- use crate::vcs::downloader::VcsDownloader;
+ use crate::vcs::downloader::VcsDownloader as _;
downloader.install(url, reference, &target)?;
}
_ => {
diff --git a/crates/mozart-core/src/repository/lockfile.rs b/crates/mozart-core/src/repository/lockfile.rs
index 6aae4df..146506d 100644
--- a/crates/mozart-core/src/repository/lockfile.rs
+++ b/crates/mozart-core/src/repository/lockfile.rs
@@ -2,7 +2,7 @@ use super::packagist::{PackagistDist, PackagistSource, PackagistVersion};
use super::repository::RepositorySet;
use super::resolver::ResolvedPackage;
use crate::installer::HasSuggests;
-use crate::package::Package;
+use crate::package::Package as _;
use crate::package::{Link, RawPackageData, to_json_pretty};
use indexmap::IndexMap;
use indexmap::IndexSet;
diff --git a/crates/mozart-core/src/repository/path_repository.rs b/crates/mozart-core/src/repository/path_repository.rs
index a96141c..0cff012 100644
--- a/crates/mozart-core/src/repository/path_repository.rs
+++ b/crates/mozart-core/src/repository/path_repository.rs
@@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
use crate::package::RawRepository;
use mozart_php_serialize::{Value as PhpValue, serialize as php_serialize};
-use sha1::{Digest, Sha1};
+use sha1::{Digest as _, Sha1};
/// Translate path repos in `repositories` into synthetic `type: package`
/// entries. Non-path entries are returned unchanged in original order.
@@ -134,7 +134,7 @@ fn compute_path_reference(json_bytes: &[u8], is_relative: bool) -> String {
let bytes = hasher.finalize();
let mut hex = String::with_capacity(bytes.len() * 2);
for b in bytes {
- use std::fmt::Write;
+ use std::fmt::Write as _;
let _ = write!(&mut hex, "{:02x}", b);
}
hex
diff --git a/crates/mozart-core/src/vcs/driver/github.rs b/crates/mozart-core/src/vcs/driver/github.rs
index 7772bbb..4df2c1c 100644
--- a/crates/mozart-core/src/vcs/driver/github.rs
+++ b/crates/mozart-core/src/vcs/driver/github.rs
@@ -303,7 +303,7 @@ impl VcsDriver for GitHubDriver {
/// Decode base64-encoded content from API responses.
/// Also used by Forgejo driver as `base64_decode_content`.
pub fn base64_decode_content(input: &str) -> Result<String> {
- use base64::Engine;
+ use base64::Engine as _;
let cleaned: Vec<u8> = input
.bytes()
.filter(|&b| b != b'\n' && b != b'\r')
diff --git a/crates/mozart-metadata-minifier/Cargo.toml b/crates/mozart-metadata-minifier/Cargo.toml
index 49534e2..1d61598 100644
--- a/crates/mozart-metadata-minifier/Cargo.toml
+++ b/crates/mozart-metadata-minifier/Cargo.toml
@@ -5,3 +5,6 @@ edition.workspace = true
[dependencies]
serde_json.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-php-serialize/Cargo.toml b/crates/mozart-php-serialize/Cargo.toml
index e66a5b3..da7f4fc 100644
--- a/crates/mozart-php-serialize/Cargo.toml
+++ b/crates/mozart-php-serialize/Cargo.toml
@@ -2,3 +2,6 @@
name = "mozart-php-serialize"
version.workspace = true
edition.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-php-serialize/src/lib.rs b/crates/mozart-php-serialize/src/lib.rs
index 6405ea8..b4c6873 100644
--- a/crates/mozart-php-serialize/src/lib.rs
+++ b/crates/mozart-php-serialize/src/lib.rs
@@ -16,7 +16,7 @@
//! does that during array construction, not at serialization time, so callers
//! that care must construct [`Value::Int`] keys directly.
-use std::fmt::Write;
+use std::fmt::Write as _;
/// One PHP value, suitable for `serialize()`.
///
diff --git a/crates/mozart-semver/Cargo.toml b/crates/mozart-semver/Cargo.toml
index cee0804..6f3db0a 100644
--- a/crates/mozart-semver/Cargo.toml
+++ b/crates/mozart-semver/Cargo.toml
@@ -2,3 +2,6 @@
name = "mozart-semver"
version.workspace = true
edition.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-spdx-licenses/Cargo.toml b/crates/mozart-spdx-licenses/Cargo.toml
index 7361c93..e3fbec2 100644
--- a/crates/mozart-spdx-licenses/Cargo.toml
+++ b/crates/mozart-spdx-licenses/Cargo.toml
@@ -6,3 +6,6 @@ edition.workspace = true
[build-dependencies]
serde.workspace = true
serde_json.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-test-harness/Cargo.toml b/crates/mozart-test-harness/Cargo.toml
index 6c9421c..cae4c8b 100644
--- a/crates/mozart-test-harness/Cargo.toml
+++ b/crates/mozart-test-harness/Cargo.toml
@@ -9,3 +9,6 @@ indexmap.workspace = true
regex.workspace = true
serde_json.workspace = true
tempfile.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart-test-harness/src/parser.rs b/crates/mozart-test-harness/src/parser.rs
index ecefb37..0645685 100644
--- a/crates/mozart-test-harness/src/parser.rs
+++ b/crates/mozart-test-harness/src/parser.rs
@@ -1,4 +1,4 @@
-use anyhow::{Context, Result, bail};
+use anyhow::{Context as _, Result, bail};
use indexmap::IndexMap;
use std::fs;
use std::path::Path;
diff --git a/crates/mozart-test-harness/src/pool_builder_parser.rs b/crates/mozart-test-harness/src/pool_builder_parser.rs
index 11d2179..2876c25 100644
--- a/crates/mozart-test-harness/src/pool_builder_parser.rs
+++ b/crates/mozart-test-harness/src/pool_builder_parser.rs
@@ -4,7 +4,7 @@
//! Section bodies are stored as raw strings (typically JSON); the runner is
//! responsible for interpreting them.
-use anyhow::{Context, Result, bail};
+use anyhow::{Context as _, Result, bail};
use std::fs;
use std::path::Path;
diff --git a/crates/mozart-test-harness/src/runner.rs b/crates/mozart-test-harness/src/runner.rs
index cefd50f..bb26255 100644
--- a/crates/mozart-test-harness/src/runner.rs
+++ b/crates/mozart-test-harness/src/runner.rs
@@ -1,4 +1,4 @@
-use anyhow::{Context, Result};
+use anyhow::{Context as _, Result};
use std::path::Path;
use std::process::Command;
use tempfile::TempDir;
diff --git a/crates/mozart/Cargo.toml b/crates/mozart/Cargo.toml
index c1b10d6..b8b3c06 100644
--- a/crates/mozart/Cargo.toml
+++ b/crates/mozart/Cargo.toml
@@ -30,3 +30,6 @@ url.workspace = true
mozart-test-harness.workspace = true
assert_cmd.workspace = true
predicates.workspace = true
+
+[lints]
+workspace = true
diff --git a/crates/mozart/src/commands/browse.rs b/crates/mozart/src/commands/browse.rs
index aabbdf8..ada3b8b 100644
--- a/crates/mozart/src/commands/browse.rs
+++ b/crates/mozart/src/commands/browse.rs
@@ -4,7 +4,7 @@ use mozart_core::console::IoInterface;
use mozart_core::console_writeln;
use mozart_core::console_writeln_error;
use mozart_core::exit_code;
-use mozart_core::package::Package;
+use mozart_core::package::Package as _;
use mozart_core::repository::browse_repos::{BrowseRepos, CompletePackageView};
use mozart_core::repository::cache::{Cache, build_cache_config};
use mozart_core::repository::installed::InstalledPackages;
diff --git a/crates/mozart/src/commands/bump.rs b/crates/mozart/src/commands/bump.rs
index 5e8634d..dc7a5e7 100644
--- a/crates/mozart/src/commands/bump.rs
+++ b/crates/mozart/src/commands/bump.rs
@@ -3,7 +3,7 @@ use clap::Args;
use indexmap::IndexMap;
use mozart_core::composer::LocalRepository;
use mozart_core::console::IoInterface;
-use mozart_core::package::{Link, Package};
+use mozart_core::package::{Link, Package as _};
use mozart_core::{console_writeln, console_writeln_error};
use std::collections::BTreeMap;
use std::path::Path;
diff --git a/crates/mozart/src/commands/completion.rs b/crates/mozart/src/commands/completion.rs
index 3622f07..97d771c 100644
--- a/crates/mozart/src/commands/completion.rs
+++ b/crates/mozart/src/commands/completion.rs
@@ -1,5 +1,5 @@
use clap::Args;
-use clap::CommandFactory;
+use clap::CommandFactory as _;
use clap_complete::aot::Shell;
use mozart_core::console::IoInterface;
diff --git a/crates/mozart/src/commands/diagnose.rs b/crates/mozart/src/commands/diagnose.rs
index 73047c0..d139467 100644
--- a/crates/mozart/src/commands/diagnose.rs
+++ b/crates/mozart/src/commands/diagnose.rs
@@ -1,6 +1,6 @@
use crate::composer::Composer;
use clap::Args;
-use colored::Colorize;
+use colored::Colorize as _;
use mozart_core::MOZART_VERSION;
use mozart_core::config::Config;
use mozart_core::config_validator::{ValidatorOptions, validate_manifest};
@@ -8,7 +8,7 @@ use mozart_core::console::IoInterface;
use mozart_core::console_writeln;
use mozart_core::factory::create_config;
use mozart_core::http::HttpDownloader;
-use mozart_core::package::CompletePackage;
+use mozart_core::package::CompletePackage as _;
use std::borrow::Cow;
use std::path::Path;
diff --git a/crates/mozart/src/commands/dump_autoload.rs b/crates/mozart/src/commands/dump_autoload.rs
index fa6c112..b66b7fc 100644
--- a/crates/mozart/src/commands/dump_autoload.rs
+++ b/crates/mozart/src/commands/dump_autoload.rs
@@ -1,6 +1,6 @@
use crate::composer::Composer;
use clap::Args;
-use mozart_core::autoload::AutoloadGeneratorExt;
+use mozart_core::autoload::AutoloadGeneratorExt as _;
use mozart_core::composer::AutoloadDumpOptions;
use mozart_core::console::IoInterface;
use mozart_core::console_writeln;
diff --git a/crates/mozart/src/commands/exec.rs b/crates/mozart/src/commands/exec.rs
index 9cbb478..e1a9e2b 100644
--- a/crates/mozart/src/commands/exec.rs
+++ b/crates/mozart/src/commands/exec.rs
@@ -1,6 +1,6 @@
use crate::composer::Composer;
use clap::Args;
-use mozart_core::package::Package;
+use mozart_core::package::Package as _;
use mozart_core::{console::IoInterface, console_writeln};
use std::path::{Path, PathBuf};
diff --git a/crates/mozart/src/commands/fund.rs b/crates/mozart/src/commands/fund.rs
index 85cd8c3..6b0cd67 100644
--- a/crates/mozart/src/commands/fund.rs
+++ b/crates/mozart/src/commands/fund.rs
@@ -7,7 +7,7 @@ use mozart_core::exit_code;
use mozart_core::repository::cache::{Cache, build_cache_config};
use mozart_core::repository::installed::InstalledPackages;
use mozart_core::repository::repository::{PackageQuery, RepositorySet};
-use serde::Serialize;
+use serde::Serialize as _;
use std::collections::{BTreeMap, BTreeSet};
#[derive(Args)]
diff --git a/crates/mozart/src/commands/init.rs b/crates/mozart/src/commands/init.rs
index 2008e8e..0e16054 100644
--- a/crates/mozart/src/commands/init.rs
+++ b/crates/mozart/src/commands/init.rs
@@ -1,6 +1,6 @@
-use anyhow::{Context, bail};
+use anyhow::{Context as _, bail};
use clap::Args;
-use colored::Colorize;
+use colored::Colorize as _;
use mozart_core::console::IoInterface;
use mozart_core::console_format;
use mozart_core::package::{
@@ -9,7 +9,7 @@ use mozart_core::package::{
use mozart_core::repository::{packagist, version};
use mozart_core::validation;
use std::collections::BTreeMap;
-use std::io::{BufRead, Write};
+use std::io::{BufRead as _, Write as _};
use std::path::Path;
use std::process::Command;
use std::sync::OnceLock;
diff --git a/crates/mozart/src/commands/install.rs b/crates/mozart/src/commands/install.rs
index 7d4aac3..54256e2 100644
--- a/crates/mozart/src/commands/install.rs
+++ b/crates/mozart/src/commands/install.rs
@@ -2,7 +2,7 @@ use clap::Args;
use indexmap::IndexSet;
use mozart_core::console::IoInterface;
use mozart_core::console_format;
-use mozart_core::package::{Package, RootPackage, RootPackageData};
+use mozart_core::package::{Package as _, RootPackage as _, RootPackageData};
use mozart_core::repository::installed;
use mozart_core::repository::installer_executor::{
Action, ExecuteContext, FilesystemExecutor, InstallerExecutor, PackageOperation,
diff --git a/crates/mozart/src/commands/licenses.rs b/crates/mozart/src/commands/licenses.rs
index ece276d..aecfe86 100644
--- a/crates/mozart/src/commands/licenses.rs
+++ b/crates/mozart/src/commands/licenses.rs
@@ -4,13 +4,13 @@ use indexmap::IndexMap;
use mozart_core::console::IoInterface;
use mozart_core::console::hyperlink;
use mozart_core::console_writeln;
-use mozart_core::package::Package;
+use mozart_core::package::Package as _;
use mozart_core::package_info;
use mozart_core::package_info::PackageUrls;
use mozart_core::package_sorter::sort_packages_alphabetically;
use mozart_core::repository_utils;
use mozart_core::repository_utils::Required;
-use serde::Serialize;
+use serde::Serialize as _;
use std::collections::BTreeMap;
#[derive(Args)]
diff --git a/crates/mozart/src/commands/reinstall.rs b/crates/mozart/src/commands/reinstall.rs
index fdad41e..d9156bc 100644
--- a/crates/mozart/src/commands/reinstall.rs
+++ b/crates/mozart/src/commands/reinstall.rs
@@ -1,6 +1,6 @@
use crate::composer::Composer;
use clap::Args;
-use mozart_core::autoload::AutoloadGeneratorExt;
+use mozart_core::autoload::AutoloadGeneratorExt as _;
use mozart_core::composer::{AutoloadDumpOptions, LocalPackage};
use mozart_core::console::IoInterface;
use mozart_core::console_format;
diff --git a/crates/mozart/src/commands/require.rs b/crates/mozart/src/commands/require.rs
index 4db6e09..3d5fcd6 100644
--- a/crates/mozart/src/commands/require.rs
+++ b/crates/mozart/src/commands/require.rs
@@ -10,7 +10,7 @@ use mozart_core::repository::resolver::{self, PlatformConfig, ResolveRequest};
use mozart_core::repository::version;
use mozart_core::repository::version_selector::VersionSelector;
use mozart_core::validation;
-use std::io::{BufRead, IsTerminal, Write};
+use std::io::{BufRead as _, IsTerminal as _, Write as _};
use std::path::{Path, PathBuf};
#[derive(Args)]
diff --git a/crates/mozart/src/commands/self_update.rs b/crates/mozart/src/commands/self_update.rs
index 4b6c27a..74983ba 100644
--- a/crates/mozart/src/commands/self_update.rs
+++ b/crates/mozart/src/commands/self_update.rs
@@ -2,7 +2,7 @@ use clap::Args;
use mozart_core::MOZART_VERSION;
use mozart_core::console::IoInterface;
use mozart_core::console_writeln;
-use std::io::Write;
+use std::io::Write as _;
use std::path::{Path, PathBuf};
#[derive(Args)]
@@ -318,7 +318,7 @@ async fn update(
// Set executable permission on Unix
#[cfg(unix)]
{
- use std::os::unix::fs::PermissionsExt;
+ use std::os::unix::fs::PermissionsExt as _;
let mut perms = std::fs::metadata(&tmp_path)?.permissions();
perms.set_mode(0o755);
std::fs::set_permissions(&tmp_path, perms)
@@ -373,7 +373,7 @@ fn rollback(
// Set executable permission on Unix before replacing
#[cfg(unix)]
{
- use std::os::unix::fs::PermissionsExt;
+ use std::os::unix::fs::PermissionsExt as _;
let mut perms = std::fs::metadata(&backup)?.permissions();
perms.set_mode(0o755);
std::fs::set_permissions(&backup, perms)
diff --git a/crates/mozart/src/commands/update.rs b/crates/mozart/src/commands/update.rs
index f4bcf64..362fad5 100644
--- a/crates/mozart/src/commands/update.rs
+++ b/crates/mozart/src/commands/update.rs
@@ -782,7 +782,7 @@ pub fn interactive_select_packages(
packages: Vec<String>,
io: std::sync::Arc<std::sync::Mutex<Box<dyn IoInterface>>>,
) -> Vec<String> {
- use std::io::{self, BufRead, IsTerminal, Write};
+ use std::io::{self, BufRead as _, IsTerminal as _, Write as _};
let stdin = io::stdin();
if !stdin.is_terminal() {
diff --git a/crates/mozart/src/main.rs b/crates/mozart/src/main.rs
index 701f3ef..bf2c980 100644
--- a/crates/mozart/src/main.rs
+++ b/crates/mozart/src/main.rs
@@ -1,4 +1,4 @@
-use clap::Parser;
+use clap::Parser as _;
use mozart::commands;
use mozart_core::MOZART_VERSION;
use mozart_core::exit_code;
@@ -70,7 +70,7 @@ async fn main() {
}
let Some(ref _cmd) = cli.command else {
- use clap::CommandFactory;
+ use clap::CommandFactory as _;
commands::Cli::command().print_help().ok();
println!();
return;