Skip to content

Commit

Permalink
Fix use of Self
Browse files Browse the repository at this point in the history
See rust-lang/rust#69611.

This is necessary because

> Using `Self` should always refer to the `Self` type, just as using
> `Self {...}` would. In other words, your code should never have
> compiled.

This'll fix the recurring build failure on nightly Rusts.

Signed-off-by: Kristofer Rye <[email protected]>
  • Loading branch information
rye committed Mar 20, 2020
1 parent cc831ef commit 1cc7418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ where
type Output = Vec3d<T>;

fn mul(self, scalar: T) -> Vec3d<T> {
Self(
Vec3d(
scalar * self.0.into(),
scalar * self.1.into(),
scalar * self.2.into(),
Expand Down

0 comments on commit 1cc7418

Please sign in to comment.