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

Sym path compat and errors #8

Merged
merged 5 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
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
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