Use string display instead of debug for url parse trace (#1498)

e.g. 

`uv_client::html::parse
url=https://download.pytorch.org/whl/torch_stable.html`

instead of

`uv_client::html::parse url=Url { scheme: "https", cannot_be_a_base:
false, username: "", password: None, host:
Some(Domain("download.pytorch.org")), port: None, path:
"/whl/torch_stable.html", query: None, fragment: None }`
This commit is contained in:
Zanie Blue 2024-02-16 09:13:16 -06:00 committed by GitHub
parent 1ed6ba0ba0
commit e6c4c77ba1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ pub(crate) struct SimpleHtml {
impl SimpleHtml { impl SimpleHtml {
/// Parse the list of [`File`]s from the simple HTML page returned by the given URL. /// Parse the list of [`File`]s from the simple HTML page returned by the given URL.
#[instrument(skip(text))] #[instrument(skip_all, fields(url = % url))]
pub(crate) fn parse(text: &str, url: &Url) -> Result<Self, Error> { pub(crate) fn parse(text: &str, url: &Url) -> Result<Self, Error> {
let dom = tl::parse(text, tl::ParserOptions::default())?; let dom = tl::parse(text, tl::ParserOptions::default())?;