Skip to content

Commit 5054390

Browse files
authored
Merge pull request #2049 from SingingTree/issue-1211-test
Add a test for issue 1211, showing it's no longer an issue.
2 parents 6c9ee31 + f3ceb54 commit 5054390

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

tests/source/issue-1211.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fn main() {
2+
for iface in &ifaces {
3+
match iface.addr {
4+
get_if_addrs::IfAddr::V4(ref addr) => {
5+
match addr.broadcast {
6+
Some(ip) => {
7+
sock.send_to(&buf, (ip, 8765)).expect("foobar");
8+
}
9+
_ => ()
10+
}
11+
}
12+
_ => ()
13+
};
14+
}
15+
}

tests/target/issue-1211.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fn main() {
2+
for iface in &ifaces {
3+
match iface.addr {
4+
get_if_addrs::IfAddr::V4(ref addr) => match addr.broadcast {
5+
Some(ip) => {
6+
sock.send_to(&buf, (ip, 8765)).expect("foobar");
7+
}
8+
_ => (),
9+
},
10+
_ => (),
11+
};
12+
}
13+
}

0 commit comments

Comments
 (0)