Fix normal function call signature

The normal function should not take a reference to an i32, since the inverse function does not take a reference to T.

Giving these functions identical call signatures improves clarity, and it makes more sense to pass integers normally than by reference.
This commit is contained in:
Adam Martinez 2017-03-28 19:22:31 -04:00 committed by GitHub
parent 91ff25e96d
commit aecb6abab4
1 changed files with 1 additions and 1 deletions

View File

@ -414,7 +414,7 @@ impl ConvertTo<i64> for i32 {
}
// Can be called with T == i32.
fn normal<T: ConvertTo<i64>>(x: &T) -> i64 {
fn normal<T: ConvertTo<i64>>(x: T) -> i64 {
x.convert()
}