Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee authored Mar 5, 2024
1 parent 27492cc commit ac3492f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions exercises/enums/enums3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ trait StateTrait {
}
impl StateImpl of StateTrait {
fn change_color(ref self: State, new_color: (u8, u8, u8)) {
let State{color: _color, position, quit, } = self;
let State{color: _, position, quit, } = self;
self = State { color: new_color, position: position, quit: quit, };
}
fn quit(ref self: State) {
let State{color, position, quit: _quit, } = self;
let State{color, position, quit: _, } = self;
self = State { color: color, position: position, quit: true, };
}

Expand All @@ -45,7 +45,7 @@ impl StateImpl of StateTrait {
}

fn move_position(ref self: State, p: Point) {
let State{color, position: _posiotion, quit, } = self;
let State{color, position: _, quit, } = self;
self = State { color: color, position: p, quit: quit, };
}

Expand Down
1 change: 0 additions & 1 deletion exercises/starknet/basics/starknet1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ mod test {
#[available_gas(2000000000)]
fn test_contract_view() {
let dispatcher = deploy_contract();
let _owner = dispatcher.get_owner();
assert('Joe' == dispatcher.get_owner(), 'Joe should be the owner.');
}

Expand Down
1 change: 0 additions & 1 deletion exercises/starknet/basics/starknet2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ mod test {
#[test]
#[available_gas(2000000000)]
fn test_owner_setting() {
let _owner: felt252 = 'Jill';
let mut calldata = ArrayTrait::new();
calldata.append('Jill');
let (address0, _) = deploy_syscall(
Expand Down
1 change: 0 additions & 1 deletion exercises/starknet/basics/starknet4.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ mod test {
fn test_stock_purchase() {
let owner = util_felt_addr('Elizabeth');
let dispatcher = deploy_contract();
let _result = dispatcher.get_owner();
// Call contract as owner
starknet::testing::set_contract_address(owner);

Expand Down

0 comments on commit ac3492f

Please sign in to comment.