From 8bf77fa786aae4993fa923f0826529bfb9ce1166 Mon Sep 17 00:00:00 2001 From: Barosl Lee Date: Wed, 12 Nov 2014 03:36:09 +0900 Subject: Fix remaining documentation to reflect fail!() -> panic!() Throughout the docs, "failure" was replaced with "panics" if it means a task panic. Otherwise, it remained as is, or changed to "errors" to clearly differentiate it from a task panic. --- src/libstd/collections/hash/map.rs | 4 ++-- src/libstd/collections/hash/table.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd/collections/hash') diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index f55ce9ba462..b7473e7bd2c 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1238,9 +1238,9 @@ impl, V: Clone, S, H: Hasher> HashMap { /// Return a copy of the value corresponding to the key. /// - /// # Failure + /// # Panics /// - /// Fails if the key is not present. + /// Panics if the key is not present. /// /// # Example /// diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index fd964cdf02c..275117a896a 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -512,9 +512,9 @@ impl>> GapThenFull { /// Rounds up to a multiple of a power of two. Returns the closest multiple /// of `target_alignment` that is higher or equal to `unrounded`. /// -/// # Failure +/// # Panics /// -/// Fails if `target_alignment` is not a power of two. +/// Panics if `target_alignment` is not a power of two. fn round_up_to_next(unrounded: uint, target_alignment: uint) -> uint { assert!(is_power_of_two(target_alignment)); (unrounded + target_alignment - 1) & !(target_alignment - 1) -- cgit 1.4.1-3-g733a5