update
This commit is contained in:
@@ -22,7 +22,7 @@ impl Rectangle {
|
|||||||
return Rectangle { width: l, hight: l };
|
return Rectangle { width: l, hight: l };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn can_hold(& self, rect_insert:& Rectangle) -> bool {
|
fn can_hold(&self, rect_insert:&Rectangle) -> bool {
|
||||||
let mut width_holdable = false;
|
let mut width_holdable = false;
|
||||||
let mut hight_holdable = false;
|
let mut hight_holdable = false;
|
||||||
if self.width > rect_insert.width || self.width > rect_insert.hight {
|
if self.width > rect_insert.width || self.width > rect_insert.hight {
|
||||||
@@ -41,7 +41,7 @@ impl Rectangle {
|
|||||||
return hold_result;
|
return hold_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn area(& self) -> u64 {
|
fn area(&self) -> u64 {
|
||||||
return self.hight * self.width
|
return self.hight * self.width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user