Skip to content

Commit

Permalink
Clippy fixes and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Mar 14, 2024
1 parent 7675470 commit ef3be42
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/commands/list/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for PackageCommand {
self.package.bright_red(),
versions
.unwrap()
.get(0)
.first()
.unwrap()
.version
.to_string()
Expand Down
1 change: 0 additions & 1 deletion src/commands/qmod/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use color_eyre::Result;

use crate::models::mod_json::ModJsonExtensions;


/// Some properties are not editable through the qmod create command, these properties are either editable through the package, or not at all
#[derive(Args, Debug, Clone)]

Expand Down
4 changes: 1 addition & 3 deletions src/commands/qmod/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ pub struct BuildQmodOperationArgs {
}

// This will parse the `qmod.template.json` and process it, then finally export a `qmod.json` for packaging and deploying.
pub(crate) fn execute_qmod_build_operation(
build_parameters: BuildQmodOperationArgs,
) -> Result<()> {
pub(crate) fn execute_qmod_build_operation(build_parameters: BuildQmodOperationArgs) -> Result<()> {
ensure!(std::path::Path::new("mod.template.json").exists(),
"No mod.template.json found in the current directory, set it up please :) Hint: use \"qmod create\"");

Expand Down
15 changes: 1 addition & 14 deletions src/commands/qmod/mod.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
use std::path::PathBuf;

use clap::{Args, Subcommand};
use color_eyre::{eyre::ensure, owo_colors::OwoColorize, Result};

use qpm_package::{
extensions::package_metadata::PackageMetadataExtensions,
models::{dependency::SharedPackageConfig, package::PackageConfig},
};
use qpm_qmod::models::mod_json::ModJson;

use crate::models::{
mod_json::ModJsonExtensions,
package::{PackageConfigExtensions, SharedPackageConfigExtensions},
};
use color_eyre::{owo_colors::OwoColorize, Result};

use super::Command;

Expand Down

0 comments on commit ef3be42

Please sign in to comment.