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

align blinky example with new system init macro #2

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

libesz
Copy link

@libesz libesz commented Dec 7, 2023

No description provided.

@CorvusPrudens
Copy link
Owner

I tested and can confirm it works! Personally, I'd prefer to destructure the context:

let init::Context { mut core, device, .. } = ctx;

but it's not a big deal (also it turns into three lines anyway with rustfmt).

One thing that does matter is rustfmt! I plan to add some CI checks that deny code that hasn't been formatted, but in the meantime, make sure to format before committing! In this case, the timer2 line was too long.

@libesz
Copy link
Author

libesz commented Dec 7, 2023

Thanks! Not sure how formatOnSave was disabled for rust 🤷 😄 . Fixed.

How you meant the destructure of the init context exactly? I don't get it, sorry.

@CorvusPrudens
Copy link
Owner

Oh I'm just referring to lines 27 and 28:

let mut core = ctx.core;
let device = ctx.device;

which could be expressed as

let init::Context { mut core, device, .. } = ctx;

but again, I don't think it matters. I'll go ahead and merge it!

@CorvusPrudens CorvusPrudens merged commit 7ae9d8f into CorvusPrudens:main Dec 7, 2023
8 checks passed
@libesz libesz deleted the fix-blinky branch December 7, 2023 20:58
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