Update minimal Rust version to 1.76
This commit is contained in:
parent
835acbce6b
commit
616498f500
4 changed files with 11 additions and 9 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust_version: ["1.75", "1.76", "1.78"]
|
rust_version: ["1.76", "1.78", "1.82"]
|
||||||
steps:
|
steps:
|
||||||
- name: rustup toolchain install ${{ matrix.rust_version }}
|
- name: rustup toolchain install ${{ matrix.rust_version }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -402,10 +402,13 @@ impl<C: RecursiveRequestCallbacks> RecursiveRequest<C> {
|
||||||
self.callbacks.on_request_start(self, id, addr);
|
self.callbacks.on_request_start(self, id, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
let response = self.dht.request(self.request.clone(), addr).await.map(|r| {
|
let response = self
|
||||||
self.mark_node_responded(addr, &r);
|
.dht
|
||||||
r
|
.request(self.request.clone(), addr)
|
||||||
});
|
.await
|
||||||
|
.inspect(|r| {
|
||||||
|
self.mark_node_responded(addr, r);
|
||||||
|
});
|
||||||
if let Some(id) = id {
|
if let Some(id) = id {
|
||||||
self.callbacks.on_request_end(self, id, addr, &response);
|
self.callbacks.on_request_end(self, id, addr, &response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ pub fn create_default_random_dir_with_torrents(
|
||||||
let dir = TempDir::with_prefix(tempdir_prefix.unwrap_or("rqbit_test")).unwrap();
|
let dir = TempDir::with_prefix(tempdir_prefix.unwrap_or("rqbit_test")).unwrap();
|
||||||
info!(path=?dir.path(), "created tempdir");
|
info!(path=?dir.path(), "created tempdir");
|
||||||
for f in 0..num_files {
|
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
|
dir
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -291,9 +291,8 @@ pub async fn discover_services(location: Url) -> anyhow::Result<RootDesc> {
|
||||||
trace!("received from {location}: {response}");
|
trace!("received from {location}: {response}");
|
||||||
let root_desc: RootDesc = quick_xml::de::from_str(&response)
|
let root_desc: RootDesc = quick_xml::de::from_str(&response)
|
||||||
.context("failed to parse response body as xml")
|
.context("failed to parse response body as xml")
|
||||||
.map_err(|e| {
|
.inspect_err(|e| {
|
||||||
debug!("failed to parse this XML: {response}");
|
debug!("failed to parse this XML: {response}. Error: {e:#}");
|
||||||
e
|
|
||||||
})?;
|
})?;
|
||||||
Ok(root_desc)
|
Ok(root_desc)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue