Skip to content

Commit

Permalink
chore: clippy fixes (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh authored Sep 9, 2024
1 parent fb260af commit 15b8e79
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ pub fn set_cargo_config_env() -> anyhow::Result<()> {
serde_json::from_reader(stdout)
.context("failed to deserialize `cargo config get` output")
})
.map_err(|e| {
.inspect_err(|_| {
let _ = child.kill();
e
})?;

let status = child.wait().context("running `cargo config get` command")?;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct Build {
#[command(subcommand)]
cmd: BuildCmd,

/// An alphanumeric string of 9 characters. Used as a fallback in case title_id is not defined in Cargo.toml.
/// An alphanumeric string of 9 characters. Used as a fallback in case `title_id` is not defined in Cargo.toml.
#[arg(long, env="VITA_DEFAULT_TITLE_ID", value_parser = clap::value_parser!(TitleId))]
default_title_id: Option<TitleId>,

Expand All @@ -53,7 +53,7 @@ enum BuildCmd {

#[derive(Args, Debug)]
struct Eboot {
/// Uploads eboot.bin to ux0:app/{title_id}/eboot.bin
/// Uploads eboot.bin to `ux0:app/{title_id}/eboot.bin`
#[arg(long, default_value = "false")]
update: bool,
/// Runs the updated app. If multiple eboot files are updated, only the last one is run.
Expand Down
25 changes: 12 additions & 13 deletions src/commands/coredump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,18 @@ impl Executor for Coredump {
tmp_file.to_path_buf()
};

let elf = match &args.elf {
Some(elf) => elf.clone(),
None => {
let (_, pkg, target_directory) = parse_crate_metadata(None)?;
let pkg = pkg.context("Not in a crate")?;

target_directory
.join(VITA_TARGET)
.join(&args.profile)
.join(pkg.name)
.with_extension("elf")
.to_string()
}
let elf = if let Some(elf) = &args.elf {
elf.clone()
} else {
let (_, pkg, target_directory) = parse_crate_metadata(None)?;
let pkg = pkg.context("Not in a crate")?;

target_directory
.join(VITA_TARGET)
.join(&args.profile)
.join(pkg.name)
.with_extension("elf")
.to_string()
};

let mut command = Command::new("vita-parse-core");
Expand Down
2 changes: 1 addition & 1 deletion src/commands/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Logs {
pub enum LogsCmd {
/// Start a TCP server on 0.0.0.0 and print to stdout all bytes read from the socket
Listen,
/// Reconfigures PrincessLog via vitacompanion.
/// Reconfigures `PrincessLog` via vitacompanion.
/// This will upload the configuration file with the ip address of your host and a port to your Vita.
Configure(Configure),
}
Expand Down

0 comments on commit 15b8e79

Please sign in to comment.