Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade smoltcp to 0.12.0 #508

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tlevora
Copy link

@tlevora tlevora commented Nov 28, 2024

No description provided.

@@ -816,7 +816,7 @@ pub struct RxToken<'a, const RD: usize>(&'a mut RDesRing<RD>);
impl<'a, const RD: usize> phy::RxToken for RxToken<'a, RD> {
fn consume<R, F>(self, f: F) -> R
where
F: FnOnce(&mut [u8]) -> R,
F: FnOnce(&[u8]) -> R,
{
let result = f(unsafe { self.0.buf_as_slice_mut() });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change it also becomes possible to return an immutable reference from the buf_as_slice_mut function on RDesRing and thus avoid triggering the clippy::mut_from_ref lint! That would be a nice simplification, and since RDesRing is private it wouldn't impact the external API

@richardeoin
Copy link
Member

Thanks for the PR! Because smoltcp 0.12.0 is only compatible with rustc back to 1.80.0, you need to raise the MSRV of this crate to pass CI. There's a commit here that shows how to change the MSRV in both the README and the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants