diff --git a/core/src/size.rs b/core/src/size.rs index 060f8fa560..5c130978d7 100644 --- a/core/src/size.rs +++ b/core/src/size.rs @@ -1,4 +1,4 @@ -use super::vector::Vector; +use crate::Vector; use std::f32; /// An amount of space in 2 dimensions. @@ -72,3 +72,9 @@ impl From for [f32; 2] { [size.width, size.height] } } + +impl From for Vector { + fn from(size: Size) -> Self { + Vector::new(size.width, size.height) + } +} diff --git a/core/src/vector.rs b/core/src/vector.rs index fd00b5ba50..e31924e702 100644 --- a/core/src/vector.rs +++ b/core/src/vector.rs @@ -1,5 +1,3 @@ -use super::size::Size; - /// A 2D vector. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Vector { @@ -82,9 +80,3 @@ where [other.x, other.y] } } - -impl From for Vector { - fn from(size: Size) -> Self { - Vector::new(size.width, size.height) - } -}