emilk / emilk/egui

Please Add "Standard" Derives to Basic / "Value" Types & Enums

Open
#1,689 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

*Side note, I wouldn't quite consider this a "feature request" or a "bug" but you may disagree.*

Could you please add the standard/typical derives for enums and "value types" in this crate? I had to create wrapper structs and `From` implementations around types such as `egui::Modifiers`, `egui::PointerButton`, and `egui::Key` just to add `PartialEq`, `Eq`, and `Hash` so they would work with `std::collections::HashSet`.

Simple enums and value types should always derive all of the so-called "standard" derive implementations to avoid this exact situation but I know it can be easy to overlook.

If possible, I will create a pull request to address this later tonight.

Thanks and I ❤️ `egui`!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the definitions of egui::Modifiers, egui::PointerButton, egui::Key, and the crate's other basic value types and enums. Review existing derives and tests for these types, then verify that the requested standard traits, including PartialEq, Eq, and Hash, support use in std::collections::HashSet.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.