about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-04-03 16:00:04 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-04-12 22:53:13 +0200
commit157ff8cd0562eefdd7aa296395c38a7bc259a4b9 (patch)
tree162a8b87c71c590b4ae1a594c4087819fb719b57 /src/libstd/collections
parent86753ce1cc520bfe50ae89f09ec47f313ce900eb (diff)
downloadrust-157ff8cd0562eefdd7aa296395c38a7bc259a4b9.tar.gz
rust-157ff8cd0562eefdd7aa296395c38a7bc259a4b9.zip
Remove the now-unit-struct AllocErr parameter of oom()
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/collections/hash/table.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index c4ef9e62577..2a00241afc6 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -784,7 +784,7 @@ impl<K, V, S> HashMap<K, V, S>
     pub fn reserve(&mut self, additional: usize) {
         match self.try_reserve(additional) {
             Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"),
-            Err(CollectionAllocErr::AllocErr(e)) => Global.oom(e),
+            Err(CollectionAllocErr::AllocErr(_)) => Global.oom(),
             Ok(()) => { /* yay */ }
          }
     }
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 10bab5df8b5..fcc2eb8fef2 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -772,7 +772,7 @@ impl<K, V> RawTable<K, V> {
     unsafe fn new_uninitialized(capacity: usize) -> RawTable<K, V> {
         match Self::try_new_uninitialized(capacity) {
             Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"),
-            Err(CollectionAllocErr::AllocErr(e)) => Global.oom(e),
+            Err(CollectionAllocErr::AllocErr(_)) => Global.oom(),
             Ok(table) => { table }
         }
     }
@@ -811,7 +811,7 @@ impl<K, V> RawTable<K, V> {
     pub fn new(capacity: usize) -> RawTable<K, V> {
         match Self::try_new(capacity) {
             Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"),
-            Err(CollectionAllocErr::AllocErr(e)) => Global.oom(e),
+            Err(CollectionAllocErr::AllocErr(_)) => Global.oom(),
             Ok(table) => { table }
         }
     }