Skip to content

Commit

Permalink
Simplify 'new'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenad committed Jul 5, 2024
1 parent b3f59ec commit 8de46d8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions exercises/practice/dominoes/.meta/example.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ struct AvailabilityTable {
#[generate_trait]
impl AvailabilityTableImpl of AvailabilityTableTrait {
fn new() -> AvailabilityTable {
let mut m: Felt252Dict<u8> = Default::default();
let len: usize = 36;
let mut i: usize = 0;
while i < len {
m.insert(i.into(), 0);
i += 1;
};
AvailabilityTable { m, len }
AvailabilityTable { m: Default::default(), len: 36 }
}

fn get(ref self: AvailabilityTable, x: u8, y: u8) -> u8 {
Expand Down

0 comments on commit 8de46d8

Please sign in to comment.