Skip to content

Commit 816725a

Browse files
committed
refactor: remove trailing macro semicolons
See rust-lang/rust#79813
1 parent c0bfbd9 commit 816725a

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/macros.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#[macro_export]
33
macro_rules! bail {
44
($msg:literal $(,)?) => {
5-
return $crate::private::Err($crate::format_err!($msg));
5+
return $crate::private::Err($crate::format_err!($msg))
66
};
77
($msg:expr $(,)?) => {
8-
return $crate::private::Err($crate::format_err!($msg));
8+
return $crate::private::Err($crate::format_err!($msg))
99
};
1010
($msg:expr, $($arg:tt)*) => {
11-
return $crate::private::Err($crate::format_err!($msg, $($arg)*));
11+
return $crate::private::Err($crate::format_err!($msg, $($arg)*))
1212
};
1313
}
1414

@@ -23,17 +23,17 @@ macro_rules! bail {
2323
macro_rules! ensure {
2424
($cond:expr, $msg:literal $(,)?) => {
2525
if !$cond {
26-
return $crate::private::Err($crate::format_err!($msg));
26+
return $crate::private::Err($crate::format_err!($msg))
2727
}
2828
};
2929
($cond:expr, $msg:expr $(,)?) => {
3030
if !$cond {
31-
return $crate::private::Err($crate::format_err!($msg));
31+
return $crate::private::Err($crate::format_err!($msg))
3232
}
3333
};
3434
($cond:expr, $msg:expr, $($arg:tt)*) => {
3535
if !$cond {
36-
return $crate::private::Err($crate::format_err!($msg, $($arg)*));
36+
return $crate::private::Err($crate::format_err!($msg, $($arg)*))
3737
}
3838
};
3939
}
@@ -49,17 +49,17 @@ macro_rules! ensure {
4949
macro_rules! ensure_eq {
5050
($left:expr, $right:expr, $msg:literal $(,)?) => {
5151
if $left != $right {
52-
return $crate::private::Err($crate::format_err!($msg));
52+
return $crate::private::Err($crate::format_err!($msg))
5353
}
5454
};
5555
($left:expr, $right:expr, $msg:expr $(,)?) => {
5656
if $left != $right {
57-
return $crate::private::Err($crate::format_err!($msg));
57+
return $crate::private::Err($crate::format_err!($msg))
5858
}
5959
};
6060
($left:expr, $right:expr, $msg:expr, $($arg:tt)*) => {
6161
if $left != $right {
62-
return $crate::private::Err($crate::format_err!($msg, $($arg)*));
62+
return $crate::private::Err($crate::format_err!($msg, $($arg)*))
6363
}
6464
};
6565
}
@@ -90,13 +90,13 @@ macro_rules! format_err {
9090
#[macro_export]
9191
macro_rules! bail_status {
9292
($status:literal, $msg:literal $(,)?) => {{
93-
return $crate::private::Err($crate::format_err_status!($status, $msg));
93+
return $crate::private::Err($crate::format_err_status!($status, $msg))
9494
}};
9595
($status:literal, $msg:expr $(,)?) => {
96-
return $crate::private::Err($crate::format_err_status!($status, $msg));
96+
return $crate::private::Err($crate::format_err_status!($status, $msg))
9797
};
9898
($status:literal, $msg:expr, $($arg:tt)*) => {
99-
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*));
99+
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*))
100100
};
101101
}
102102

@@ -112,17 +112,17 @@ macro_rules! bail_status {
112112
macro_rules! ensure_status {
113113
($cond:expr, $status:literal, $msg:literal $(,)?) => {
114114
if !$cond {
115-
return $crate::private::Err($crate::format_err_status!($status, $msg));
115+
return $crate::private::Err($crate::format_err_status!($status, $msg))
116116
}
117117
};
118118
($cond:expr, $status:literal, $msg:expr $(,)?) => {
119119
if !$cond {
120-
return $crate::private::Err($crate::format_err_status!($status, $msg));
120+
return $crate::private::Err($crate::format_err_status!($status, $msg))
121121
}
122122
};
123123
($cond:expr, $status:literal, $msg:expr, $($arg:tt)*) => {
124124
if !$cond {
125-
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*));
125+
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*))
126126
}
127127
};
128128
}
@@ -139,17 +139,17 @@ macro_rules! ensure_status {
139139
macro_rules! ensure_eq_status {
140140
($left:expr, $right:expr, $status:literal, $msg:literal $(,)?) => {
141141
if $left != $right {
142-
return $crate::private::Err($crate::format_err_status!($status, $msg));
142+
return $crate::private::Err($crate::format_err_status!($status, $msg))
143143
}
144144
};
145145
($left:expr, $right:expr, $status:literal, $msg:expr $(,)?) => {
146146
if $left != $right {
147-
return $crate::private::Err($crate::format_err_status!($status, $msg));
147+
return $crate::private::Err($crate::format_err_status!($status, $msg))
148148
}
149149
};
150150
($left:expr, $right:expr, $status:literal, $msg:expr, $($arg:tt)*) => {
151151
if $left != $right {
152-
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*));
152+
return $crate::private::Err($crate::format_err_status!($status, $msg, $($arg)*))
153153
}
154154
};
155155
}

0 commit comments

Comments
 (0)