Update minimal Rust version to 1.76

This commit is contained in:
Igor Katson 2024-11-16 11:13:58 +00:00
parent 835acbce6b
commit 616498f500
4 changed files with 11 additions and 9 deletions

View file

@ -402,10 +402,13 @@ impl<C: RecursiveRequestCallbacks> RecursiveRequest<C> {
self.callbacks.on_request_start(self, id, addr);
}
let response = self.dht.request(self.request.clone(), addr).await.map(|r| {
self.mark_node_responded(addr, &r);
r
});
let response = self
.dht
.request(self.request.clone(), addr)
.await
.inspect(|r| {
self.mark_node_responded(addr, r);
});
if let Some(id) = id {
self.callbacks.on_request_end(self, id, addr, &response);
}

View file

@ -46,7 +46,7 @@ pub fn create_default_random_dir_with_torrents(
let dir = TempDir::with_prefix(tempdir_prefix.unwrap_or("rqbit_test")).unwrap();
info!(path=?dir.path(), "created tempdir");
for f in 0..num_files {
create_new_file_with_random_content(&dir.path().join(&format!("{f}.data")), file_size);
create_new_file_with_random_content(&dir.path().join(format!("{f}.data")), file_size);
}
dir
}

View file

@ -291,9 +291,8 @@ pub async fn discover_services(location: Url) -> anyhow::Result<RootDesc> {
trace!("received from {location}: {response}");
let root_desc: RootDesc = quick_xml::de::from_str(&response)
.context("failed to parse response body as xml")
.map_err(|e| {
debug!("failed to parse this XML: {response}");
e
.inspect_err(|e| {
debug!("failed to parse this XML: {response}. Error: {e:#}");
})?;
Ok(root_desc)
}