Skip to content

Commit d1d941a

Browse files
committed
Merge pull request #602 from ner0x652/patch-1
Update methods perimeter expression
2 parents 02944a5 + 81b8e29 commit d1d941a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/fn/methods/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl Rectangle {
4141
let Point { x: x1, y: y1 } = self.p1;
4242
let Point { x: x2, y: y2 } = self.p2;
4343

44-
2.0 * (x1 - x2).abs() + 2.0 * (y1 - y2).abs()
44+
2.0 * ((x1 - x2).abs() + (y1 - y2).abs())
4545
}
4646

4747
// This method requires the caller object to be mutable

0 commit comments

Comments
 (0)