]>
git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch11-writing-automated-tests/listing-11-06/src/lib.rs
8 fn can_hold(&self, other
: &Rectangle
) -> bool
{
9 self.width
> other
.width
&& self.height
> other
.height
19 fn larger_can_hold_smaller() {
20 let larger
= Rectangle
{
24 let smaller
= Rectangle
{
29 assert
!(larger
.can_hold(&smaller
));