Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for issue 1211, showing it's no longer an issue.
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
1 parent
6c9ee31
commit f3ceb54
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
_ => () | ||
} | ||
} | ||
_ => () | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
_ => (), | ||
}, | ||
_ => (), | ||
}; | ||
} | ||
} |