Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/utils/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub mod hash;
pub mod interfaces;
pub mod math;
pub mod signature;
pub mod span;
pub mod storage;
pub mod time;
pub mod trace;
8 changes: 8 additions & 0 deletions packages/utils/src/span.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pub fn contains<T, +PartialEq<T>, +Drop<T>, +Copy<T>>(span: Span<T>, value: T) -> bool {
for item in span {
if *item == value {
return true;
}
}
false
}