mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
chore: fix cargo clippy (#174)
This commit is contained in:
@@ -43,7 +43,7 @@ impl AccessControl {
|
||||
}
|
||||
for rule in raw_rules {
|
||||
let parts: Vec<&str> = rule.split('@').collect();
|
||||
let create_err = || format!("Invalid auth `{}`", rule).into();
|
||||
let create_err = || format!("Invalid auth `{rule}`").into();
|
||||
match parts.as_slice() {
|
||||
[path, readwrite] => {
|
||||
let control = PathControl {
|
||||
@@ -172,7 +172,7 @@ impl Account {
|
||||
let user = p[0];
|
||||
let pass = p[1];
|
||||
let mut h = Context::new();
|
||||
h.consume(format!("{}:{}:{}", user, REALM, pass).as_bytes());
|
||||
h.consume(format!("{user}:{REALM}:{pass}").as_bytes());
|
||||
Some(Account {
|
||||
user: user.to_owned(),
|
||||
pass: format!("{:x}", h.compute()),
|
||||
@@ -190,7 +190,7 @@ impl AuthMethod {
|
||||
pub fn www_auth(&self, stale: bool) -> String {
|
||||
match self {
|
||||
AuthMethod::Basic => {
|
||||
format!("Basic realm=\"{}\"", REALM)
|
||||
format!("Basic realm=\"{REALM}\"")
|
||||
}
|
||||
AuthMethod::Digest => {
|
||||
let str_stale = if stale { "stale=true," } else { "" };
|
||||
|
||||
Reference in New Issue
Block a user