Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const REDIS_ALLOCATOR_NOT_AVAILABLE_MESSAGE: &str =
/// Defines the Redis allocator. This allocator delegates the allocation
/// and deallocation tasks to the Redis server when available, otherwise
/// it panics.
#[derive(Default, Debug, Copy, Clone)]
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to compare the allocator? Or hash it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't need it right here, but if the struct wants to wrap it within another struct and do some counting and simply wants to derive a trait, not having those for RedisAlloc disallows that and requires implementing it manually. This is more just for convenience.

pub struct RedisAlloc;

unsafe impl GlobalAlloc for RedisAlloc {
Expand Down