Skip to content

Commit cdf9d35

Browse files
authored
Merge pull request #1673 from woofyzhao/fix_generics_bounds
fix incorrect trait bound demonstration
2 parents 05584f0 + 739354c commit cdf9d35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generics/bounds.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ fn main() {
5858
let _triangle = Triangle { length: 3.0, height: 4.0 };
5959
6060
print_debug(&rectangle);
61-
println!("Area: {}", rectangle.area());
61+
println!("Area: {}", area(&rectangle));
6262
6363
//print_debug(&_triangle);
64-
//println!("Area: {}", _triangle.area());
64+
//println!("Area: {}", area(&_triangle));
6565
// ^ TODO: Try uncommenting these.
6666
// | Error: Does not implement either `Debug` or `HasArea`.
6767
}

0 commit comments

Comments
 (0)