Skip to content

Commit

Permalink
Allow trailing comma in macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Mar 25, 2022
1 parent 8ed9d38 commit d8de2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/riscv_ulp_hal/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub type EspError = core::convert::Infallible;

#[macro_export]
macro_rules! esp_result {
($err:expr, $value:expr,?) => {{
($err:expr, $value:expr $(,)?) => {{
$err;

Ok($value)
Expand All @@ -20,7 +20,7 @@ macro_rules! esp_result {

#[macro_export]
macro_rules! esp {
($err:expr,?) => {{
($err:expr $(,)?) => {{
$err;

core::result::Result::<(), EspError>::Ok(())
Expand Down

0 comments on commit d8de2e3

Please sign in to comment.