Skip to content

Commit

Permalink
Merge pull request #1673 from woofyzhao/fix_generics_bounds
Browse files Browse the repository at this point in the history
fix incorrect trait bound demonstration
  • Loading branch information
marioidival authored Jan 31, 2023
2 parents 05584f0 + 739354c commit cdf9d35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generics/bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ fn main() {
let _triangle = Triangle { length: 3.0, height: 4.0 };
print_debug(&rectangle);
println!("Area: {}", rectangle.area());
println!("Area: {}", area(&rectangle));
//print_debug(&_triangle);
//println!("Area: {}", _triangle.area());
//println!("Area: {}", area(&_triangle));
// ^ TODO: Try uncommenting these.
// | Error: Does not implement either `Debug` or `HasArea`.
}
Expand Down

0 comments on commit cdf9d35

Please sign in to comment.