We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1040e3 commit ac94da8Copy full SHA for ac94da8
content/lessons/03_data_types/data_types.rs
@@ -33,7 +33,7 @@ impl Hero {
33
// The i-th field of a tuple or a tuple struct can be accessed through 'tuple.i'.
34
// Do not abuse this syntax, though; it's often cleaner to perform
35
// pattern matching to decompose the tuple.
36
-(pos.0 - self.position.0).unsigned_abs() + (pos.1 - self.position.1).unsigned_abs()
+ (pos.0 - self.position.0).unsigned_abs() + (pos.1 - self.position.1).unsigned_abs()
37
}
38
39
// Mutable borrow of self allows to change instance fields.
0 commit comments