Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants