diff options
| author | bors <bors@rust-lang.org> | 2016-10-03 11:00:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-03 11:00:03 -0700 |
| commit | 7a26aeca77bcf334747eddb630e3b9475149b7f5 (patch) | |
| tree | 1c3b1e3e30d338f9ecdc2d8b9badf13d1ab4cb84 /src/libstd/ffi | |
| parent | ff713464e6530fab2e13d0965929d8189c59ae56 (diff) | |
| parent | 10c3134da025f3d63700abf52769c0f106637a14 (diff) | |
| download | rust-7a26aeca77bcf334747eddb630e3b9475149b7f5.tar.gz rust-7a26aeca77bcf334747eddb630e3b9475149b7f5.zip | |
Auto merge of #36815 - alexcrichton:stabilize-1.13, r=aturon
std: Stabilize and deprecate APIs for 1.13 This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
Diffstat (limited to 'src/libstd/ffi')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 6f5ce350e6c..3ad5b5627d3 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -726,7 +726,8 @@ mod tests { use super::*; use os::raw::c_char; use borrow::Cow::{Borrowed, Owned}; - use hash::{SipHasher, Hash, Hasher}; + use hash::{Hash, Hasher}; + use collections::hash_map::DefaultHasher; #[test] fn c_to_rust() { @@ -808,10 +809,10 @@ mod tests { let ptr = data.as_ptr() as *const c_char; let cstr: &'static CStr = unsafe { CStr::from_ptr(ptr) }; - let mut s = SipHasher::new_with_keys(0, 0); + let mut s = DefaultHasher::new(); cstr.hash(&mut s); let cstr_hash = s.finish(); - let mut s = SipHasher::new_with_keys(0, 0); + let mut s = DefaultHasher::new(); CString::new(&data[..data.len() - 1]).unwrap().hash(&mut s); let cstring_hash = s.finish(); |
