A fork of attic a self-hostable Nix Binary Cache server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix lint

get_or_insert_permission_mut returns a mut reference.

Fixes #77.

+2 -2
+1 -1
server/src/adm/command/make_token.rs
··· 85 85 macro_rules! grant_permissions { 86 86 ($token:ident, $list:expr, $perm:ident) => { 87 87 for pattern in $list { 88 - let mut perm = $token.get_or_insert_permission_mut(pattern.to_owned()); 88 + let perm = $token.get_or_insert_permission_mut(pattern.to_owned()); 89 89 perm.$perm = true; 90 90 } 91 91 };
+1 -1
server/src/oobe.rs
··· 67 67 let in_two_years = Utc::now().checked_add_months(Months::new(24)).unwrap(); 68 68 let mut token = Token::new("root".to_string(), &in_two_years); 69 69 let any_cache = CacheNamePattern::new("*".to_string()).unwrap(); 70 - let mut perm = token.get_or_insert_permission_mut(any_cache); 70 + let perm = token.get_or_insert_permission_mut(any_cache); 71 71 perm.pull = true; 72 72 perm.push = true; 73 73 perm.delete = true;