mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-21 16:33:55 +02:00
Compiler Update
This commit is contained in:
parent
595e740ad3
commit
53be6ebab5
|
@ -8,7 +8,7 @@ const MD5_TRANSPOSE: &[u8] = b"\x0c\x06\x00\x0d\x07\x01\x0e\x08\x02\x0f\x09\x03\
|
|||
const CRYPT_HASH64: &[u8] = b"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
pub fn md5_sha2_hash64_encode(bs: &[u8]) -> String {
|
||||
let ngroups = (bs.len() + 2) / 3;
|
||||
let ngroups = bs.len().div_ceil(3);
|
||||
let mut out = String::with_capacity(ngroups * 4);
|
||||
for g in 0..ngroups {
|
||||
let mut g_idx = g * 3;
|
||||
|
|
|
@ -165,10 +165,10 @@ impl ReplEntryV1 {
|
|||
// but for now, if it's an empty set in any capacity, we map
|
||||
// to None and just send the Cid since they have the same result
|
||||
// on how the entry/attr state looks at each end.
|
||||
if maybe.len() > 0 {
|
||||
Some(maybe.to_db_valueset_v2())
|
||||
} else {
|
||||
if maybe.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(maybe.to_db_valueset_v2())
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -298,10 +298,10 @@ impl ReplIncrementalEntryV1 {
|
|||
let live_attr = live_attrs.get(attr_name);
|
||||
let cid = cid.into();
|
||||
let attr = live_attr.and_then(|maybe| {
|
||||
if maybe.len() > 0 {
|
||||
Some(maybe.to_db_valueset_v2())
|
||||
} else {
|
||||
if maybe.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(maybe.to_db_valueset_v2())
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ impl ActorReader {
|
|||
// Is this a design flaw? We probably need to know what the state was that we
|
||||
// requested to move to?
|
||||
match (&self.state, action, result) {
|
||||
(State::Unauthenticated { .. }, TransitionAction::Login, TransitionResult::Ok) => {
|
||||
(State::Unauthenticated, TransitionAction::Login, TransitionResult::Ok) => {
|
||||
self.state = State::Authenticated;
|
||||
}
|
||||
(State::Authenticated, TransitionAction::ReadSelfMemberOf, TransitionResult::Ok) => {
|
||||
|
|
Loading…
Reference in a new issue