Skip to content

Commit

Permalink
base64ct: derive additional traits on alphabets
Browse files Browse the repository at this point in the history
  • Loading branch information
sivizius committed Oct 19, 2024
1 parent 8a854c7 commit fde251c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion base64ct/src/alphabet/bcrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{Alphabet, DecodeStep, EncodeStep};
/// ./ [A-Z] [a-z] [0-9]
/// 0x2e-0x2f, 0x41-0x5a, 0x61-0x7a, 0x30-0x39
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64Bcrypt;

impl Alphabet for Base64Bcrypt {
Expand Down
2 changes: 1 addition & 1 deletion base64ct/src/alphabet/crypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{Alphabet, DecodeStep, EncodeStep};
/// [.-9] [A-Z] [a-z]
/// 0x2e-0x39, 0x41-0x5a, 0x61-0x7a
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64Crypt;

impl Alphabet for Base64Crypt {
Expand Down
2 changes: 1 addition & 1 deletion base64ct/src/alphabet/shacrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use super::{Alphabet, DecodeStep, EncodeStep};
/// [.-9] [A-Z] [a-z]
/// 0x2e-0x39, 0x41-0x5a, 0x61-0x7a
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64ShaCrypt;

impl Alphabet for Base64ShaCrypt {
Expand Down
4 changes: 2 additions & 2 deletions base64ct/src/alphabet/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{Alphabet, DecodeStep, EncodeStep};
/// [A-Z] [a-z] [0-9] + /
/// 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64;

impl Alphabet for Base64 {
Expand All @@ -25,7 +25,7 @@ impl Alphabet for Base64 {
/// [A-Z] [a-z] [0-9] + /
/// 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64Unpadded;

impl Alphabet for Base64Unpadded {
Expand Down
4 changes: 2 additions & 2 deletions base64ct/src/alphabet/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{Alphabet, DecodeStep, EncodeStep};
/// [A-Z] [a-z] [0-9] - _
/// 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2d, 0x5f
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64Url;

impl Alphabet for Base64Url {
Expand All @@ -25,7 +25,7 @@ impl Alphabet for Base64Url {
/// [A-Z] [a-z] [0-9] - _
/// 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2d, 0x5f
/// ```
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Base64UrlUnpadded;

impl Alphabet for Base64UrlUnpadded {
Expand Down

0 comments on commit fde251c

Please sign in to comment.