Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
style:
name: style
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -33,7 +33,7 @@ jobs:
- stable
features:
- stm32f745,ptp
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -51,7 +51,7 @@ jobs:
# Compilation
build:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
target:
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

build-feature-mixer:
name: build-feature-mixer
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
target:
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
# for stm32f429
examples:
name: examples
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
example:
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
# Test that all the code shared with other MCU families also compiles
examples-common:
name: examples-common
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
- examples
- examples-common
- build-feature-mixer
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
run: exit 0
4 changes: 2 additions & 2 deletions src/dma/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl<'rx, 'tx> EthernetDMA<'rx, 'tx> {
/// If no packet is available, this function returns [`Err(RxError::WouldBlock)`](RxError::WouldBlock).
///
/// It may also return another kind of [`RxError`].
pub fn recv_next(&mut self, packet_id: Option<PacketId>) -> Result<RxPacket, RxError> {
pub fn recv_next(&'_ mut self, packet_id: Option<PacketId>) -> Result<RxPacket<'_>, RxError> {
self.rx_ring.recv_next(packet_id.map(Into::into))
}

Expand Down Expand Up @@ -284,7 +284,7 @@ impl<'rx, 'tx> EthernetDMA<'rx, 'tx> {
/// Receive a packet.
///
/// See [`RxRing::recv`].
pub async fn recv(&mut self, packet_id: Option<PacketId>) -> RxPacket {
pub async fn recv(&'_ mut self, packet_id: Option<PacketId>) -> RxPacket<'_> {
self.rx_ring.recv(packet_id).await
}

Expand Down
4 changes: 2 additions & 2 deletions src/dma/rx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<'a> RxRing<'a> {

/// Receive the next packet (if any is ready), or return [`Err`]
/// immediately.
pub fn recv_next(&mut self, packet_id: Option<PacketId>) -> Result<RxPacket, RxError> {
pub fn recv_next(&'_ mut self, packet_id: Option<PacketId>) -> Result<RxPacket<'_>, RxError> {
let (entry, length) = self.recv_next_impl(packet_id.map(|p| p.into()))?;
Ok(RxPacket {
entry: &mut self.entries[entry],
Expand All @@ -173,7 +173,7 @@ impl<'a> RxRing<'a> {
/// The returned [`RxPacket`] can be used as a slice, and
/// will contain the ethernet data.
#[cfg(feature = "async-await")]
pub async fn recv(&mut self, packet_id: Option<PacketId>) -> RxPacket {
pub async fn recv(&'_ mut self, packet_id: Option<PacketId>) -> RxPacket<'_> {
let (entry, length) = core::future::poll_fn(|ctx| {
let res = self.recv_next_impl(packet_id.clone());

Expand Down