diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-09-28 17:23:36 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-10-10 16:06:05 -0700 |
| commit | 2d1feefc59a3500efef7a4da2789d5149537db07 (patch) | |
| tree | 5f82355a85172cc928e6f887e69cd7ff65a071c5 /src/libstd/ffi/c_str.rs | |
| parent | fcb74b198a9cee3202320fbeeb39347117de281a (diff) | |
| download | rust-2d1feefc59a3500efef7a4da2789d5149537db07.tar.gz rust-2d1feefc59a3500efef7a4da2789d5149537db07.zip | |
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` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` 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/c_str.rs')
| -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 d6a5efbd279..4d7b0434fd9 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -724,7 +724,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() { @@ -806,10 +807,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(); |
