aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart')
-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
16 files changed, 25 insertions, 22 deletions
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;