Skip to content

Commit

Permalink
Add a test for issue 1211, showing it's no longer an issue.
Browse files Browse the repository at this point in the history
Since rustfmt has moved away from syntex the overflow seen in issue 1211
is no longer a problem. This commit adds a test to verify that.
  • Loading branch information
SingingTree committed Oct 10, 2017
1 parent 6c9ee31 commit f3ceb54
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/source/issue-1211.rs
@@ -0,0 +1,15 @@
fn main() {
for iface in &ifaces {
match iface.addr {
get_if_addrs::IfAddr::V4(ref addr) => {
match addr.broadcast {
Some(ip) => {
sock.send_to(&buf, (ip, 8765)).expect("foobar");
}
_ => ()
}
}
_ => ()
};
}
}
13 changes: 13 additions & 0 deletions tests/target/issue-1211.rs
@@ -0,0 +1,13 @@
fn main() {
for iface in &ifaces {
match iface.addr {
get_if_addrs::IfAddr::V4(ref addr) => match addr.broadcast {
Some(ip) => {
sock.send_to(&buf, (ip, 8765)).expect("foobar");
}
_ => (),
},
_ => (),
};
}
}

0 comments on commit f3ceb54

Please sign in to comment.