Skip to content

Commit

Permalink
Merge pull request #8 from dwattttt/sym_path_compat_and_errors
Browse files Browse the repository at this point in the history
Sym path compat and errors
  • Loading branch information
DrChat authored Nov 8, 2022
2 parents c15af4f + c9402fd commit 87a03d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ async fn run() -> anyhow::Result<()> {

match download_manifest(args[2].clone(), lines).await {
Ok(_) => println!("Success!"),
Err(e) => println!("Failed: {}", e),
Err(e) => println!("Failed: {:#}", e),
}
} else if args.len() == 4 && args[1] == "download_single" {
let ctx = SymContext::new(args[2].clone()).context("failed to create symbol context")?;
Expand Down
10 changes: 6 additions & 4 deletions src/symsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ impl FromStr for SymSrv {
match directives.first() {
// Simply exit the match statement if the directive is "SRV"
Some(x) => {
if "SRV" == *x {
if x.eq_ignore_ascii_case("SRV") {
if directives.len() != 3 {
anyhow::bail!("");
anyhow::bail!("Unsupported server string form; only 'SRV*<CACHE_PATH>*<SYMBOL_SERVER>' supported");
}

// Alright, the directive is of the proper form. Return the server and filepath.
Expand All @@ -138,11 +138,13 @@ impl FromStr for SymSrv {
}

None => {
anyhow::bail!("Unsupported server string form");
anyhow::bail!("Unsupported server string form; only 'SRV*<CACHE_PATH>*<SYMBOL_SERVER>' supported");
}
};

unreachable!();
anyhow::bail!(
"Unsupported server string form; only 'SRV*<CACHE_PATH>*<SYMBOL_SERVER>' supported"
);
}
}

Expand Down

0 comments on commit 87a03d7

Please sign in to comment.