From 6129b1c1e808ef28d32cdd6d0d9cfb4d9b267f31 Mon Sep 17 00:00:00 2001 From: Jakob Degen Date: Tue, 20 Dec 2022 11:39:57 -0800 Subject: [PATCH] Support custom hashers in some impls Summary: As it says in the title. For now we don't track any of the possible memory usage by these hashers, but we wouldn't normally expect them to use significant memory. Reviewed By: bobyangyf Differential Revision: D41976482 fbshipit-source-id: 42364ca5a362af580eb083e0ca26531f481de0ee --- allocative/src/impls/std/collections.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allocative/src/impls/std/collections.rs b/allocative/src/impls/std/collections.rs index ae0c215..75b9a39 100644 --- a/allocative/src/impls/std/collections.rs +++ b/allocative/src/impls/std/collections.rs @@ -33,7 +33,7 @@ impl Allocative for BTreeSet { } } -impl Allocative for HashMap { +impl Allocative for HashMap { fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) { let mut visitor = visitor.enter_self_sized::(); // TODO: can do better extra capacity. @@ -42,7 +42,7 @@ impl Allocative for HashMap { } } -impl Allocative for HashSet { +impl Allocative for HashSet { fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) { let mut visitor = visitor.enter_self_sized::(); // TODO: can do better extra capacity.