diff --git a/crates/src/random/deck.cairo b/crates/src/random/deck.cairo index 717d8fda..5d6f3a14 100644 --- a/crates/src/random/deck.cairo +++ b/crates/src/random/deck.cairo @@ -80,7 +80,7 @@ impl DeckImpl of DeckTrait { fn from_bitmap(seed: felt252, number: u32, mut bitmap: u128) -> Deck { assert(number <= 128, errors::TOO_MANY_CARDS); - let mut deck = DeckTrait::new(seed, number); + let mut deck = Self::new(seed, number); let mut card: u8 = 1; loop { if bitmap == 0 || card.into() > number { diff --git a/crates/src/rating/elo.cairo b/crates/src/rating/elo.cairo index 19607cdd..7182a83d 100644 --- a/crates/src/rating/elo.cairo +++ b/crates/src/rating/elo.cairo @@ -91,9 +91,9 @@ impl Private of PrivateTrait { } else if exp == 1_u8.into() { base } else if exp % 2_u8.into() == 0_u8.into() { - PrivateTrait::pow(base * base, exp / 2_u8.into()) + Self::pow(base * base, exp / 2_u8.into()) } else { - base * PrivateTrait::pow(base * base, exp / 2_u8.into()) + base * Self::pow(base * base, exp / 2_u8.into()) } } diff --git a/examples/matchmaker/src/helpers/bitmap.cairo b/examples/matchmaker/src/helpers/bitmap.cairo index f10809b0..6ae61276 100644 --- a/examples/matchmaker/src/helpers/bitmap.cairo +++ b/examples/matchmaker/src/helpers/bitmap.cairo @@ -17,13 +17,13 @@ mod errors { impl Bitmap of BitmapTrait { #[inline(always)] fn get_bit_at(bitmap: u256, index: felt252) -> bool { - let mask = Bitmap::two_pow(index); + let mask = Self::two_pow(index); bitmap & mask == mask } #[inline(always)] fn set_bit_at(bitmap: u256, index: felt252, value: bool) -> u256 { - let mask = Bitmap::two_pow(index); + let mask = Self::two_pow(index); if value { bitmap | mask } else { @@ -40,10 +40,10 @@ impl Bitmap of BitmapTrait { /// * The index of the nearest significant bit #[inline(always)] fn nearest_significant_bit(x: u256, s: u8) -> Option:: { - let lower_mask = Bitmap::set_bit_at(0, (s + 1).into(), true) - 1; - let lower = Bitmap::most_significant_bit(x & lower_mask); + let lower_mask = Self::set_bit_at(0, (s + 1).into(), true) - 1; + let lower = Self::most_significant_bit(x & lower_mask); let upper_mask = ~(lower_mask / 2); - let upper = Bitmap::least_significant_bit(x & upper_mask); + let upper = Self::least_significant_bit(x & upper_mask); match (lower, upper) { ( Option::Some(l), Option::Some(u) diff --git a/token/src/erc721/erc721.cairo b/token/src/erc721/erc721.cairo index 71e2003b..c392abaf 100644 --- a/token/src/erc721/erc721.cairo +++ b/token/src/erc721/erc721.cairo @@ -125,7 +125,7 @@ mod ERC721 { let caller = get_caller_address(); assert( - owner == caller || ERC721Impl::is_approved_for_all(@self, owner, caller), + owner == caller || Self::is_approved_for_all(@self, owner, caller), Errors::UNAUTHORIZED ); self._approve(to, token_id);