d-e-s-o / debuginfod

A crate for interacting with debuginfod servers.
Apache License 2.0
3 stars 1 forks source link

On success, return the server URL #8

Closed javierhonduco closed 2 weeks ago

javierhonduco commented 2 weeks ago

Sometimes it could be useful to know what debuginfod server returned success (e.g. to store long-term in case we need to re-download it later on, or for debugging purposes). Would this be something you would be ok with?

This could be implemented by changing the fetch_debug_info return type, and also return a struct with more information, including the server that returned the data.

d-e-s-o commented 2 weeks ago

Yes, we could return a more general Response object from Client::fetch_debug_info that includes this information, I think.

javierhonduco commented 2 weeks ago

OT, wanted to ask you this before, do you have any config that's not in the repo? I am running a nightly version of the Rust toolchain and I am constantly fighting with having to manually undo cargo fmt changes.

Currently running:

$ cargo fmt --version
rustfmt 1.8.0-nightly (90ab8eaedd 2024-11-14)
d-e-s-o commented 2 weeks ago

Hm, strange. The repo's .rustfmt.toml should have everything. I have a global one, but it's basically just a subset and I can rename it and everything still formats the same. Perhaps yours is not being picked up for some reason? Perhaps investigate with rustfmt --print-config current .rustfmt.toml or so. Maybe we have to set unstable_features = true as well? It's not necessary for me, though.

javierhonduco commented 2 weeks ago

Thanks for your reply! It's pretty odd, not sure what's going off... Will investigate more next week. Anyways, just pushed a PR for this feature 😄 https://github.com/d-e-s-o/debuginfod/pull/10