Format the code

This commit is contained in:
Mubelotix
2025-06-19 15:55:12 +02:00
parent ab768f379f
commit 2d6dc83940
3 changed files with 5 additions and 4 deletions

View File

@ -91,8 +91,10 @@ impl HeedAuthStore {
Action::All => { Action::All => {
actions.extend(enum_iterator::all::<Action>()); actions.extend(enum_iterator::all::<Action>());
actions.remove(&Action::AllGet); actions.remove(&Action::AllGet);
}, }
Action::AllGet => actions.extend(enum_iterator::all::<Action>().filter(|a| a.is_read())), Action::AllGet => {
actions.extend(enum_iterator::all::<Action>().filter(|a| a.is_read()))
}
Action::DocumentsAll => { Action::DocumentsAll => {
actions.extend( actions.extend(
[Action::DocumentsGet, Action::DocumentsDelete, Action::DocumentsAdd] [Action::DocumentsGet, Action::DocumentsDelete, Action::DocumentsAdd]

View File

@ -422,7 +422,7 @@ impl Action {
match self { match self {
// Any action that expands to others must return false, as it wouldn't be able to expand recursively. // Any action that expands to others must return false, as it wouldn't be able to expand recursively.
All | AllGet | DocumentsAll | IndexesAll | ChatsAll | TasksAll | SettingsAll All | AllGet | DocumentsAll | IndexesAll | ChatsAll | TasksAll | SettingsAll
| StatsAll | MetricsAll | DumpsAll | SnapshotsAll | ChatsSettingsAll => false, | StatsAll | MetricsAll | DumpsAll | SnapshotsAll | ChatsSettingsAll => false,
Search => true, Search => true,
DocumentsAdd => false, DocumentsAdd => false,

View File

@ -1,5 +1,4 @@
use crate::common::{shared_does_not_exists_index, Server}; use crate::common::{shared_does_not_exists_index, Server};
use crate::json; use crate::json;
#[actix_rt::test] #[actix_rt::test]