mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-22 03:36:17 +00:00
Get rid of unused macros
This commit is contained in:
1 parent
897f64283f
commit
88ed9cb4f2
1 file changed
-19
@@ -37,25 +37,6 @@ pub enum Token {
|
||||
End,
|
||||
}
|
||||
|
||||
macro_rules! expect_token {
|
||||
() => {
|
||||
match self.next() {
|
||||
Some(token) => token,
|
||||
None => { return Err(self.end_of_stream_error()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! match_token {
|
||||
($( $variant:pat => $expr:expr ),+) => {
|
||||
match expect_token!() {
|
||||
$( Ok($variant) => $expr ),+,
|
||||
Ok(_) => { return Err(self.syntax_error()); }
|
||||
Err(err) => { return Err(err); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! to_result {
|
||||
($expr:expr, $err:expr) => {
|
||||
match $expr {
|
||||
|
||||
Reference in new issue
Block a user