I'm trying to write a generic function summ in rust - but to no avail. Could someone please elucidate the problem?
fn summ<T:Add>(a:T,b:T)->T {
a+b
}
closed as unclear what you're asking by gnat, Michael Kohne, MichaelT, GlenH7, Kilian Foth Jun 23 at 10:36Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. |
|||||
|
|
|||||
|
I don't know much about Rust, but I'm assuming that since there are no constraints on |
|||||
|