Skip to content

Commit

Permalink
Test fixes from the rollup
Browse files Browse the repository at this point in the history
Closes rust-lang#15807 (Deprecate some unsafe functions in `str::raw` and remove `OwnedStr` trait)
Closes rust-lang#15859 (Implement `Show` for `CString` and fix warning compiling tests for libcollections)
Closes rust-lang#15911 (Updated LLVM for iOS)
Closes rust-lang#15925 (libsyntax: Remove `~self` and `mut ~self` from the language.)
Closes rust-lang#15930 (Add examples for Checked[Add|Sub|Mul|Div])
Closes rust-lang#15933 (rustdoc: make table of contents optional)
Closes rust-lang#15937 (librustc: Make bare functions implement the `FnMut` trait.)
Closes rust-lang#15938 (librustc: Check structure constructors against their types.)
Closes rust-lang#15939 (rustdoc: Add a --crate-name option)
Closes rust-lang#15942 (Document trie collections)
Closes rust-lang#15943 (Document SmallIntMap)
  • Loading branch information
alexcrichton committed Jul 24, 2014
1 parent dff1406 commit 1031ad8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libnative/io/addrinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ impl GetAddrInfoRequest {
assert!(host.is_some() || servname.is_some());

let c_host = host.map(|x| x.to_c_str());
let c_host = c_host.as_ref().map(|x| x.as_ptr()).unwrap_or(null());
let c_serv = servname.map(|x| x.to_c_str());
let c_serv = c_serv.as_ref().map(|x| x.as_ptr()).unwrap_or(null());

let hint = hint.map(|hint| {
libc::addrinfo {
Expand All @@ -49,9 +51,7 @@ impl GetAddrInfoRequest {

// Make the call
let s = unsafe {
let ch = if c_host.is_none() { null() } else { c_host.unwrap().as_ptr() };
let cs = if c_serv.is_none() { null() } else { c_serv.unwrap().as_ptr() };
getaddrinfo(ch, cs, hint_ptr, &mut res)
getaddrinfo(c_host, c_serv, hint_ptr, &mut res)
};

// Error?
Expand Down

2 comments on commit 1031ad8

@alexcrichton
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ p=10

@alexcrichton
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors: retry

Please sign in to comment.