Move unit tests inside conditionally compiled mod tests { } blocks
Idiomatic rust organizes unit tests into `mod tests { }` blocks
using conditional compilation `[cfg(test)]` to decide whether to
compile the code in that block.
This commit moves "bare" test functions into such blocks, and puts
the block at the bottom of respective file.
This commit is contained in:
@@ -171,8 +171,7 @@ Proxy-Connection: Keep-Alive\r\n\
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Proto;
|
||||
use super::Proxy;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parse_proxy_fakeproto() {
|
||||
|
||||
Reference in New Issue
Block a user