Skip to main content
added 64 characters in body
Source Link
Jörg W Mittag
  • 104k
  • 24
  • 225
  • 324

I don't know much about Rust, but I'm assuming that since there are no constraints on T, there's no way to know that it even has a + operator. You should probably constrain T to implement std::ops::Add.

I don't know much about Rust, but I'm assuming that since there are no constraints on T, there's no way to know that it even has a + operator.

I don't know much about Rust, but I'm assuming that since there are no constraints on T, there's no way to know that it even has a + operator. You should probably constrain T to implement std::ops::Add.

Source Link
Jörg W Mittag
  • 104k
  • 24
  • 225
  • 324

I don't know much about Rust, but I'm assuming that since there are no constraints on T, there's no way to know that it even has a + operator.