Skip to content

Commit

Permalink
Add esp_result! version without return value arg
Browse files Browse the repository at this point in the history
  • Loading branch information
N3xed committed Aug 15, 2021
1 parent 54dfa50 commit 018020c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ macro_rules! esp_result {
($err:expr, $value:expr) => {{
esp_idf_sys::EspError::check_and_return($err as esp_idf_sys::esp_err_t, $value)
}};
($err:expr) => {{
esp_idf_sys::EspError::check_and_return($err as esp_idf_sys::esp_err_t, ())
}};
}

#[macro_export]
Expand Down

0 comments on commit 018020c

Please sign in to comment.