Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
refactor: apply code simplification to break with bool value (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm authored Nov 11, 2024
1 parent f6ab047 commit 8041c3b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/contracts/src/utils/naming.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ pub fn is_name_valid(name: @ByteArray) -> bool {
let mut i = 0;
loop {
if i >= name.len() {
if i > 0 {
break true;
} else {
break false;
}
break (i > 0);
}

let c = name.at(i).unwrap();
Expand Down

0 comments on commit 8041c3b

Please sign in to comment.