Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed Dec 12, 2024
1 parent db349c4 commit d732986
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 4 additions & 2 deletions aderyn_core/src/detect/low/deprecated_oz_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ impl IssueDetector for DeprecatedOZFunctionsDetector {
if import_directives.iter().any(|directive| {
directive
.absolute_path
.as_ref().is_some_and(|path| path.contains("openzeppelin"))
.as_ref()
.is_some_and(|path| path.contains("openzeppelin"))
}) && identifier.name == "_setupRole"
{
capture!(self, context, identifier);
Expand All @@ -49,7 +50,8 @@ impl IssueDetector for DeprecatedOZFunctionsDetector {
if import_directives.iter().any(|directive| {
directive
.absolute_path
.as_ref().is_some_and(|path| path.contains("openzeppelin"))
.as_ref()
.is_some_and(|path| path.contains("openzeppelin"))
}) && member_access.member_name == "safeApprove"
{
capture!(self, context, member_access);
Expand Down
3 changes: 2 additions & 1 deletion aderyn_core/src/detect/low/unsafe_oz_erc721_mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ impl IssueDetector for UnsafeERC721MintDetector {
if import_directives.iter().any(|directive| {
directive
.absolute_path
.as_ref().is_some_and(|path| path.contains("openzeppelin"))
.as_ref()
.is_some_and(|path| path.contains("openzeppelin"))
}) && identifier.name == "_mint"
{
let this_contract_definition = identifier
Expand Down
6 changes: 1 addition & 5 deletions aderyn_core/src/fscloc/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ impl FromStr for CodeIterator {
type Err = usize;

fn from_str(code: &str) -> Result<Self, <Self as FromStr>::Err> {
Ok(CodeIterator {
content: code.chars().collect::<Vec<_>>(),
curr_pos: 0,
line_no: 1,
})
Ok(CodeIterator { content: code.chars().collect::<Vec<_>>(), curr_pos: 0, line_no: 1 })
}
}

0 comments on commit d732986

Please sign in to comment.