forked from nrabulinski/attic
Fix lint
get_or_insert_permission_mut returns a mut reference. Fixes #77.
This commit is contained in:
parent
4f81255892
commit
f4cf5704d6
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ pub struct MakeToken {
|
||||||
macro_rules! grant_permissions {
|
macro_rules! grant_permissions {
|
||||||
($token:ident, $list:expr, $perm:ident) => {
|
($token:ident, $list:expr, $perm:ident) => {
|
||||||
for pattern in $list {
|
for pattern in $list {
|
||||||
let mut perm = $token.get_or_insert_permission_mut(pattern.to_owned());
|
let perm = $token.get_or_insert_permission_mut(pattern.to_owned());
|
||||||
perm.$perm = true;
|
perm.$perm = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -67,7 +67,7 @@ pub async fn run_oobe() -> Result<()> {
|
||||||
let in_two_years = Utc::now().checked_add_months(Months::new(24)).unwrap();
|
let in_two_years = Utc::now().checked_add_months(Months::new(24)).unwrap();
|
||||||
let mut token = Token::new("root".to_string(), &in_two_years);
|
let mut token = Token::new("root".to_string(), &in_two_years);
|
||||||
let any_cache = CacheNamePattern::new("*".to_string()).unwrap();
|
let any_cache = CacheNamePattern::new("*".to_string()).unwrap();
|
||||||
let mut perm = token.get_or_insert_permission_mut(any_cache);
|
let perm = token.get_or_insert_permission_mut(any_cache);
|
||||||
perm.pull = true;
|
perm.pull = true;
|
||||||
perm.push = true;
|
perm.push = true;
|
||||||
perm.delete = true;
|
perm.delete = true;
|
||||||
|
|
Loading…
Reference in a new issue