sorz / moproxy

A transparent TCP to SOCKSv5/HTTP proxy on Linux written in Rust.
MIT License
223 stars 35 forks source link

fix "trailing semicolon in macro used in expression position" warning #9

Closed ahxxm closed 2 years ago

ahxxm commented 2 years ago

warned by rust 1.56.0

warning: trailing semicolon in macro used in expression position
  --> src/proxy/socks5.rs:53:52
   |
53 |         Err(io::Error::new(ErrorKind::Other, $msg));
   |                                                    ^
...
83 |         [0x05, 0xff] => err!("auth required by socks server"),
   |                         ------------------------------------- in this macro invocation
   |
   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
   = note: this warning originates in the macro `err` (in Nightly builds, run with -Z macro-backtrace for more info)