Skip to content

Commit 0a7316c

Browse files
committed
feat(points/2d): relax bounds on Point2D::new
Copy was needed for the methods _after_ `new`
1 parent 41f7930 commit 0a7316c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/points/two_d.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ impl<T: Debug, U: Debug> Debug for Point2D<T, U> {
1717
}
1818
}
1919

20-
impl<T: Copy, U: Copy> Point2D<T, U> {
20+
impl<T, U> Point2D<T, U> {
2121
pub fn new(x: T, y: U) -> Self {
2222
Self(x, y)
2323
}
24+
}
2425

26+
impl<T: Copy, U: Copy> Point2D<T, U> {
2527
pub fn x(&self) -> T {
2628
self.0
2729
}

0 commit comments

Comments
 (0)