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

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

tlevora
Copy link
Contributor

@tlevora tlevora commented Nov 28, 2024

No description provided.

@tlevora tlevora force-pushed the smoltcp-0.12.0-upgrade branch from 20ebbb0 to 4bd4959 Compare November 28, 2024 21:06
@@ -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.

@tlevora tlevora requested a review from richardeoin December 3, 2024 13:27
@richardeoin richardeoin merged commit 2857ddc into stm32-rs:master Dec 4, 2024
1 of 22 checks passed
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