Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(proguard): Delete pointless code #2263

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/commands/upload_proguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::{bail, Error, Result};
use clap::ArgAction;
use clap::{Arg, ArgMatches, Command};
use console::style;
use log::{debug, info};
use log::info;
use proguard::ProguardMapping;
use symbolic::common::ByteView;
use uuid::Uuid;
Expand All @@ -16,7 +16,7 @@ use crate::api::AssociateProguard;
use crate::config::Config;
use crate::utils::android::dump_proguard_uuids_as_properties;
use crate::utils::args::ArgExt;
use crate::utils::fs::{get_sha1_checksum, TempFile};
use crate::utils::fs::TempFile;
use crate::utils::system::QuietExit;
use crate::utils::ui::{copy_with_progress, make_byte_progress_bar};

Expand Down Expand Up @@ -135,15 +135,13 @@ pub fn make_command(command: Command) -> Command {
}

pub fn execute(matches: &ArgMatches) -> Result<()> {

let paths: Vec<_> = match matches.get_many::<String>("paths") {
Some(paths) => paths.collect(),
None => {
return Ok(());
}
};
let mut mappings = vec![];
let mut all_checksums = vec![];

let forced_uuid = matches.get_one::<Uuid>("uuid");
if forced_uuid.is_some() && paths.len() != 1 {
Expand All @@ -168,10 +166,6 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
does not contain any line information."
);
} else {
let mut f = fs::File::open(path)?;
let sha = get_sha1_checksum(&mut f)?.to_string();
debug!("SHA1 for mapping file '{}': '{}'", path, sha);
all_checksums.push(sha);
mappings.push(MappingRef {
path: PathBuf::from(path),
size: md.len(),
Expand Down
Loading