Skip to content

Commit

Permalink
build(deps): update async-io requirement from 1.3 to 2.0
Browse files Browse the repository at this point in the history
Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-io/releases)
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md)
- [Commits](smol-rs/async-io@v1.3.0...v1.13.0)

---
updated-dependencies:
- dependency-name: async-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and tamird committed Oct 23, 2023
1 parent 847f410 commit c89b2d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ default-members = [
[workspace.dependencies]
anyhow = { version = "1", default-features = false }
assert_matches = { version = "1.5.0", default-features = false }
async-io = { version = "1.3", default-features = false }
async-io = { version = "2.0", default-features = false }
aya = { path = "aya", version = "0.11.0", default-features = false }
aya-bpf = { path = "bpf/aya-bpf", default-features = false }
aya-log = { path = "aya-log", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion aya/src/maps/perf/async_perf_event_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl<T: BorrowMut<MapData>> AsyncPerfEventArrayBuffer<T> {
if !buf.get_ref().readable() {
buf.readable().await?;
}
buf.get_mut()
unsafe { buf.get_mut() }
};

let events = buf.read_events(buffers)?;
Expand Down
8 changes: 7 additions & 1 deletion aya/src/maps/perf/perf_event_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::{
borrow::{Borrow, BorrowMut},
ops::Deref,
os::fd::{AsFd as _, AsRawFd, RawFd},
os::fd::{AsFd, AsRawFd, BorrowedFd, RawFd},
sync::Arc,
};

Expand Down Expand Up @@ -55,6 +55,12 @@ impl<T: BorrowMut<MapData>> PerfEventArrayBuffer<T> {
}
}

impl<T: BorrowMut<MapData>> AsFd for PerfEventArrayBuffer<T> {
fn as_fd(&self) -> BorrowedFd<'_> {
self.buf.as_fd()
}
}

impl<T: BorrowMut<MapData>> AsRawFd for PerfEventArrayBuffer<T> {
fn as_raw_fd(&self) -> RawFd {
self.buf.as_raw_fd()
Expand Down
2 changes: 2 additions & 0 deletions xtask/public-api/aya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ pub struct aya::maps::perf::PerfEventArrayBuffer<T>
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> aya::maps::perf::PerfEventArrayBuffer<T>
pub fn aya::maps::perf::PerfEventArrayBuffer<T>::read_events(&mut self, out_bufs: &mut [bytes::bytes_mut::BytesMut]) -> core::result::Result<aya::maps::perf::Events, aya::maps::perf::PerfBufferError>
pub fn aya::maps::perf::PerfEventArrayBuffer<T>::readable(&self) -> bool
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> std::os::fd::owned::AsFd for aya::maps::perf::PerfEventArrayBuffer<T>
pub fn aya::maps::perf::PerfEventArrayBuffer<T>::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_>
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> std::os::fd::raw::AsRawFd for aya::maps::perf::PerfEventArrayBuffer<T>
pub fn aya::maps::perf::PerfEventArrayBuffer<T>::as_raw_fd(&self) -> std::os::fd::raw::RawFd
impl<T> core::marker::Send for aya::maps::perf::PerfEventArrayBuffer<T> where T: core::marker::Send + core::marker::Sync
Expand Down

0 comments on commit c89b2d1

Please sign in to comment.