DAV server passing Litmus test suite
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use quote::quote;
|
||||
use syn::{parse_macro_input, Data, DeriveInput};
|
||||
use syn::{Data, DeriveInput, parse_macro_input};
|
||||
|
||||
#[proc_macro_derive(EnumMethods)]
|
||||
pub fn enum_id(input: TokenStream) -> TokenStream {
|
||||
|
||||
@@ -12,10 +12,10 @@ use std::{
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use mail_auth::{ResolverCache, Txt, MX};
|
||||
use mail_auth::{MX, ResolverCache, Txt};
|
||||
use quick_cache::{
|
||||
sync::{DefaultLifecycle, PlaceholderGuard},
|
||||
Equivalent, Weighter,
|
||||
sync::{DefaultLifecycle, PlaceholderGuard},
|
||||
};
|
||||
|
||||
use crate::config::Config;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
|
||||
|
||||
use rustls::{crypto::ring::cipher_suite::*, SupportedCipherSuite};
|
||||
use rustls::{SupportedCipherSuite, crypto::ring::cipher_suite::*};
|
||||
|
||||
use super::utils::ParseValue;
|
||||
|
||||
@@ -84,13 +84,13 @@ impl ParseValue for IpAddrMask {
|
||||
return Ok(IpAddrMask::V4 {
|
||||
addr,
|
||||
mask: u32::MAX << (32 - mask),
|
||||
})
|
||||
});
|
||||
}
|
||||
IpAddr::V6(addr) if (8..=128).contains(&mask) => {
|
||||
return Ok(IpAddrMask::V6 {
|
||||
addr,
|
||||
mask: u128::MAX << (128 - mask),
|
||||
})
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
@@ -101,13 +101,13 @@ impl ParseValue for IpAddrMask {
|
||||
return Ok(IpAddrMask::V4 {
|
||||
addr,
|
||||
mask: u32::MAX,
|
||||
})
|
||||
});
|
||||
}
|
||||
Ok(IpAddr::V6(addr)) => {
|
||||
return Ok(IpAddrMask::V6 {
|
||||
addr,
|
||||
mask: u128::MAX,
|
||||
})
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
use std::{
|
||||
collections::{btree_map::Entry, BTreeMap},
|
||||
collections::{BTreeMap, btree_map::Entry},
|
||||
iter::Peekable,
|
||||
str::Chars,
|
||||
};
|
||||
@@ -299,9 +299,9 @@ impl<'x, 'y> TomlParser<'x, 'y> {
|
||||
'}' => break,
|
||||
ch => {
|
||||
return Err(format!(
|
||||
"Unexpected character {:?} found in inline table for property {:?} at line {}.",
|
||||
ch, key, self.line
|
||||
));
|
||||
"Unexpected character {:?} found in inline table for property {:?} at line {}.",
|
||||
ch, key, self.line
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ impl<'x, 'y> TomlParser<'x, 'y> {
|
||||
"Expected {:?} but found {:?} in value at line {}.",
|
||||
stop_chars, ch, self.line
|
||||
))
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ use std::{
|
||||
};
|
||||
|
||||
use mail_auth::{
|
||||
IpLookupStrategy,
|
||||
common::crypto::{Algorithm, HashAlgorithm},
|
||||
dkim::Canonicalization,
|
||||
IpLookupStrategy,
|
||||
};
|
||||
use smtp_proto::MtPriority;
|
||||
|
||||
@@ -216,11 +216,7 @@ impl Config {
|
||||
|
||||
if let Some(value) = self.keys.get(&key).and_then(|v| {
|
||||
let v = v.trim();
|
||||
if !v.is_empty() {
|
||||
Some(v)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if !v.is_empty() { Some(v) } else { None }
|
||||
}) {
|
||||
Some(value)
|
||||
} else {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
pub mod parser;
|
||||
pub mod parser;
|
||||
pub mod pointer;
|
||||
|
||||
use downcast_rs::{Downcast, impl_downcast};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use super::{JsonPointerItem, JsonQueryable};
|
||||
use super::{JsonPointerItem, JsonQueryable};
|
||||
use std::hash::BuildHasher;
|
||||
use std::{collections::HashMap, slice::Iter};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user