How to implement T/2.0 T is a Generic

Merry Christmas!

I now writing a binary search program using rust,When calculate the mid((start+end)/2) in c++/c ,I can write like (start+end)/2.0 ,but in rust it's invalid.how can I implement it? Thank you for you answer!

Something like Rust Playground

Should also mention that you may want to use an overflow avoiding construction: start + ((end - start) / 2)

Thanks.