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

Never return type for reset::restart #382

Closed
stabl-gjn opened this issue Feb 21, 2024 · 0 comments
Closed

Never return type for reset::restart #382

stabl-gjn opened this issue Feb 21, 2024 · 0 comments

Comments

@stabl-gjn
Copy link
Contributor

I noticed that reset::restart does not have a return type. As the device is restarting and thus never leaving this function wouldn't it make sense to set the return type as the never type / !?

The generated c ffi function binding are already using this as return value:

extern "C" {
    #[doc = " @brief  Restart PRO and APP CPUs.\n\n This function can be called both from PRO and APP CPUs.\n After successful restart, CPU reset reason will be SW_CPU_RESET.\n Peripherals (except for WiFi, BT, UART0, SPI1, and legacy timers) are not reset.\n This function does not return."]
    pub fn esp_restart() -> !;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants