Skip to content

Commit db36fc8

Browse files
committed
Avoid unreachable pattern warning
1 parent d97d93e commit db36fc8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libstd/sys_common/net.rs

+2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ pub fn lookup_host(host: &str) -> io::Result<LookupHost> {
189189
c::res_init();
190190
Err(e)
191191
},
192+
// the cfg is needed here to avoid an "unreachable pattern" warning
193+
#[cfg(not(unix))]
192194
Err(e) => Err(e),
193195
}
194196
}

0 commit comments

Comments
 (0)