Skip to content

Commit

Permalink
Update minimal Rust version to 1.76
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Nov 18, 2024
1 parent 835acbc commit 616498f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust_version: ["1.75", "1.76", "1.78"]
rust_version: ["1.76", "1.78", "1.82"]
steps:
- name: rustup toolchain install ${{ matrix.rust_version }}
run: |
Expand Down
11 changes: 7 additions & 4 deletions crates/dht/src/dht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/librqbit/src/tests/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 2 additions & 3 deletions crates/upnp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 616498f

Please sign in to comment.