diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-14 16:02:44 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-14 16:02:44 -0600 |
| commit | 1221acc75b7589f719c0157f239726d5bf270efc (patch) | |
| tree | 17f1ce68d29414b6e1b20e48ffdaf8812d832541 | |
| parent | 7893dc14eeb28770c85860a1ae453edbdfa5a8f2 (diff) | |
chore: fix linter error with type complexity
| -rw-r--r-- | src/authorization/entities.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/authorization/entities.rs b/src/authorization/entities.rs index ec1a7a1b..050f6f26 100644 --- a/src/authorization/entities.rs +++ b/src/authorization/entities.rs @@ -1,6 +1,10 @@ use crate::gitlab::Api; use serde::Serialize; use std::collections::HashSet; +use std::future::Future; +use std::pin::Pin; + +type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + 'a>>; // Cedar entity structures // Note: We define custom types instead of using cedar_policy::Entity directly because: @@ -102,9 +106,7 @@ impl EntitiesRepository { group_id: u64, entities: &'a mut Vec<CedarEntity>, groups: &'a mut HashSet<u64>, - ) -> std::pin::Pin< - Box<dyn std::future::Future<Output = Result<(), Box<dyn std::error::Error>>> + 'a>, - > { + ) -> BoxFuture<'a, Result<(), Box<dyn std::error::Error>>> { Box::pin(async move { if groups.contains(&group_id) { return Ok(()); |
