Skip to content

Commit

Permalink
fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmwells-amazon committed Oct 5, 2023
1 parent 466da4b commit c004d17
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cedar-policy-core/src/ast/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl EntityUIDEntry {
/// Get the UID of the entry, or `None` if it is unknown (partial evaluation)
pub fn uid(&self) -> Option<&EntityUID> {
match self {
Self::Concrete(euid) => Some(&euid),
Self::Concrete(euid) => Some(euid),
Self::Unknown => None,
}
}
Expand Down
6 changes: 3 additions & 3 deletions cedar-policy-core/src/authorizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ impl Authorizer {
ErrorHandling::Deny => Response::new(
Decision::Deny,
idset
.chain(partial.diagnostics.reason.into_iter())
.chain(partial.diagnostics.reason)
.collect(),
errors,
),
ErrorHandling::Forbid => Response::new(
Decision::Deny,
idset
.chain(partial.diagnostics.reason.into_iter())
.chain(partial.diagnostics.reason)
.collect(),
errors,
),
Expand Down Expand Up @@ -149,7 +149,7 @@ impl Authorizer {
Response::new(
Decision::Deny,
idset
.chain(partial.diagnostics.reason.into_iter())
.chain(partial.diagnostics.reason)
.collect(),
errors,
)
Expand Down
2 changes: 1 addition & 1 deletion cedar-policy-core/src/est.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl TryFrom<cst::Cond> for Clause {
let expr = match expr {
Ok(expr) => Some(expr),
Err(expr_errs) => {
errs.extend(expr_errs.0.into_iter());
errs.extend(expr_errs.0);
None
}
};
Expand Down
2 changes: 1 addition & 1 deletion cedar-policy-core/src/extensions/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Decimal {
// check that the string matches the regex
// PANIC SAFETY: This regex does parse
#[allow(clippy::unwrap_used)]
let re = Regex::new(r#"^(-?\d+)\.(\d+)$"#).unwrap();
let re = Regex::new(r"^(-?\d+)\.(\d+)$").unwrap();
if !re.is_match(str.as_ref()) {
return Err(Error::FailedParse(str.as_ref().to_owned()));
}
Expand Down
2 changes: 1 addition & 1 deletion cedar-policy-core/src/parser/unescape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub(crate) fn to_pattern(s: &str) -> Result<Vec<PatternElem>, Vec<UnescapeError>
Err(EscapeError::InvalidEscape)
// note that the range argument refers to the *byte* offset into the string.
// so we can compare the byte slice against the bytes of the ``star'' escape sequence.
if &bytes[range.start..range.end] == r#"\*"#.as_bytes()
if &bytes[range.start..range.end] == r"\*".as_bytes()
=>
{
unescaped_str.push(PatternElem::Char('*'))
Expand Down

0 comments on commit c004d17

Please sign in to comment.