Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
format code, avoid unused code warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernQ committed Sep 4, 2023
1 parent 04ad225 commit 2d3f37b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ fn main() {
// enabled, either the `esp32c3`, `esp32c6`, or `esp32s3` chip feature is
// enabled.
if cfg!(feature = "print-jtag-serial")
&& !(cfg!(feature = "esp32c3") || cfg!(feature = "esp32c6") || cfg!(feature = "esp32s3") || cfg!(feature = "esp32h2"))
&& !(cfg!(feature = "esp32c3")
|| cfg!(feature = "esp32c6")
|| cfg!(feature = "esp32s3")
|| cfg!(feature = "esp32h2"))
{
panic!(
"The `print-jtag-serial` feature is only supported by the ESP32-C3, ESP32-C6, ESP32-S3 and ESP32-H2 chips"
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ fn is_valid_ram_address(address: u32) -> bool {
not(any(feature = "esp32", feature = "esp32s3")),
not(feature = "halt-cores")
))]
#[allow(unused)]
fn halt() -> ! {
loop {}
}

#[cfg(all(any(feature = "esp32", feature = "esp32s3"), feature = "halt-cores"))]
#[allow(unused)]
fn halt() -> ! {
#[cfg(feature = "esp32")]
mod registers {
Expand Down

0 comments on commit 2d3f37b

Please sign in to comment.