Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Palacios <accorell@amazon.com>
  • Loading branch information
adpaco-aws committed Mar 7, 2025
1 parent c0cb75d commit 5b60e2b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cedar-drt/fuzz/fuzz_targets/wildcard-matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use cedar_drt_inner::fuzz_target;
use cedar_policy_core::ast::{Pattern, PatternElem};
use libfuzzer_sys::arbitrary::{self, Arbitrary, Result, Unstructured};
use regex::{escape, Regex};
use serde::{Serialize, Serializer};
use serde::ser::SerializeStruct;
use serde::{Serialize, Serializer};

/// Input expected by this fuzz target:
/// A pattern and a string that matches it
Expand All @@ -40,10 +40,14 @@ impl Serialize for FuzzTargetInput {
{
let mut state = serializer.serialize_struct("FuzzTargetInput", 2)?;

let pattern: Vec<String> = self.pattern.iter().map(|e| match e {
PatternElem::Char(c) => c.to_string(),
PatternElem::Wildcard => "*".to_string(),
}).collect();
let pattern: Vec<String> = self
.pattern
.iter()
.map(|e| match e {
PatternElem::Char(c) => c.to_string(),
PatternElem::Wildcard => "*".to_string(),
})
.collect();

state.serialize_field("pattern", &pattern)?;
state.serialize_field("string", &self.string)?;
Expand Down

0 comments on commit 5b60e2b

Please sign in to comment.