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

feat(core): add strum::EnumIter and strum::EnumCount to Chain #2043

Merged
merged 3 commits into from Jan 12, 2023

Conversation

joshieDo
Copy link
Contributor

Motivation

For situations where we want to iterate through all Chain variants.

Solution

We are already using strum, so just adding EnumIter & EnumCount is enough.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

@@ -191,7 +192,8 @@ pub enum Authorization {

impl Authorization {
pub fn basic(username: impl Into<String>, password: impl Into<String>) -> Self {
let auth_secret = base64::encode(username.into() + ":" + &password.into());
let auth_secret = base64::engine::general_purpose::STANDARD
.encode(username.into() + ":" + &password.into());
Copy link
Collaborator

Choose a reason for hiding this comment

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

pls see #2032

Copy link
Contributor

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

makes sense, yeah #2032 can probably be merged first

@gakonst gakonst merged commit 3c65997 into gakonst:master Jan 12, 2023
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.

None yet

4 participants