Skip to content

Commit

Permalink
fixed formatting errors
Browse files Browse the repository at this point in the history
Signed-off-by: Kelley Li <[email protected]>
  • Loading branch information
l-kli committed Nov 14, 2024
1 parent 4eb6c1e commit 87eb3ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/public/file/entity_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::io::Error;
use std::sync::Arc;

use async_trait::async_trait;
use cedar_policy::{Entities, entities_errors::EntitiesError, Request, Schema};
use cedar_policy::{entities_errors::EntitiesError, Entities, Request, Schema};
use derive_builder::Builder;
use thiserror::Error;
use tokio::sync::RwLock;
Expand Down
18 changes: 7 additions & 11 deletions src/public/log/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,8 @@ mod test {
use std::str::FromStr;

use cedar_policy::{
AuthorizationError, Context, Entities, EntityId, EntityTypeName, EntityUid,
EvaluationError, PolicyId, Request, Response, PolicySet, Authorizer
AuthorizationError, Authorizer, Context, Entities, EntityId, EntityTypeName, EntityUid,
EvaluationError, PolicyId, PolicySet, Request, Response,
};
use cedar_policy_core::ast::{PolicyID, RestrictedExpr, Value};
use cedar_policy_core::authorizer::Decision;
Expand Down Expand Up @@ -1149,7 +1149,10 @@ mod test {
#[test]
fn build_ocsf_severity_multiple_errors() {
assert_eq!(build_ocsf_severity(1), (SeverityId::Low, "Low".to_string()));
assert_eq!(build_ocsf_severity(4), (SeverityId::Medium, "Medium".to_string()));
assert_eq!(
build_ocsf_severity(4),
(SeverityId::Medium, "Medium".to_string())
);
}

#[test]
Expand Down Expand Up @@ -1431,14 +1434,7 @@ mod test {
EntityTypeName::from_str("Photo").unwrap(),
EntityId::from_str("vacation.jpg").unwrap(),
);
Request::new(
principal,
action,
resource,
Context::empty(),
None,
)
.unwrap()
Request::new(principal, action, resource, Context::empty(), None).unwrap()
}

fn create_mock_entities() -> Entities {
Expand Down

0 comments on commit 87eb3ce

Please sign in to comment.