From ed7180f664e0ec74ff0b95a7935ff3f69ba8cbc8 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 15 Sep 2024 12:52:47 +0100 Subject: [PATCH] Fix compile --- src/ptero_perms_sync.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/ptero_perms_sync.rs b/src/ptero_perms_sync.rs index 26ea2e1..d7b900c 100644 --- a/src/ptero_perms_sync.rs +++ b/src/ptero_perms_sync.rs @@ -60,7 +60,13 @@ async fn run_on_server(data: &ProtobotData, server: &str) -> Result<(), crate::E } else if remaining_panel_access.remove(&existing_user.email) { if existing_user.permissions.iter().collect::>() != panel_access_perms { server - .set_user_permissions(existing_user.uuid, panel_access_perms.iter().collect()) + .set_user_permissions( + existing_user.uuid, + panel_access_perms + .iter() + .map(|str| (*str).clone()) + .collect(), + ) .await?; } } else if !ignored_emails.contains(&existing_user.email) { @@ -80,7 +86,13 @@ async fn run_on_server(data: &ProtobotData, server: &str) -> Result<(), crate::E } for user in remaining_panel_access { server - .add_user(user, panel_access_perms.iter().collect()) + .add_user( + user, + panel_access_perms + .iter() + .map(|str| (*str).clone()) + .collect(), + ) .await?; }