Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify mode flags #116

Merged
merged 2 commits into from
May 4, 2024
Merged

Simplify mode flags #116

merged 2 commits into from
May 4, 2024

Conversation

progval
Copy link
Collaborator

@progval progval commented Apr 18, 2024

  1. Rename *Flag::to_char and MembershipFlagFlag::to_prefix to MembershipFlagFlag::mode_char and MembershipFlagFlag::prefix_char, because the prefix is also a char
  2. Remove *Set::char_for and MembershipFlagSet::prefix_for, they are less efficient duplicates of the above
  3. Move *Set::flag_for and MembershipFlagSet::flag_for_prefix to *Flag::from_mode_char and MembershipFlagFlag::from_prefix_char because they don't belong on a set and "flag_for" is an unclear name
  4. Remove chars from ALL and all() because they are not needed anymore
  5. Removed parser support for specifying extra chars that would be ignored

1. Rename `*Flag::to_char` and `MembershipFlagFlag::to_prefix` to
   `MembershipFlagFlag::mode_char` and `MembershipFlagFlag::prefix_char`,
   because the prefix is also a char
2. Remove `*Set::char_for` and `MembershipFlagSet::prefix_for`, they are less
   efficient duplicates of the above
3. Move `*Set::flag_for` and `MembershipFlagSet::flag_for_prefix` to
   `*Flag::from_mode_char` and `MembershipFlagFlag::from_prefix_char`
   because they don't belong on a set and "flag_for" is an unclear name
4. Remove chars from `ALL` and `all()` because they are not needed
   anymore
5. Removed parser support for specifying extra chars that would be
   ignored
@progval
Copy link
Collaborator Author

progval commented Apr 18, 2024

(I'm aware of mode_letter and from_char, I'll send another PR after this one to fix the inconsistency)

actually I just added it to this PR

@spb spb merged commit 3117454 into Libera-Chat:master May 4, 2024
2 checks passed
@progval progval deleted the mode-flags branch May 4, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants