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
|
@ -85,7 +85,7 @@ pub struct MakeToken {
|
|||
macro_rules! grant_permissions {
|
||||
($token:ident, $list:expr, $perm:ident) => {
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -67,7 +67,7 @@ pub async fn run_oobe() -> Result<()> {
|
|||
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 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.push = true;
|
||||
perm.delete = true;
|
||||
|
|
Loading…
Reference in a new issue