diff --git a/src/coordinate_systems/kartesian/traits.rs b/src/coordinate_systems/kartesian/traits.rs index 5713ecb..de7b0ba 100644 --- a/src/coordinate_systems/kartesian/traits.rs +++ b/src/coordinate_systems/kartesian/traits.rs @@ -4,6 +4,7 @@ use crate::predefined_const; use super::Kartesian; +/// implements an method that turns an Kartesian of all sizes into Coordinates macro_rules! to_coords_impl { ($subtype:ident) => { impl ToCoords for Kartesian<$subtype> { @@ -63,9 +64,6 @@ to_coords_impl!(u128); impl ToCoords for Kartesian { fn to_coords(self) -> Kartesian { - Kartesian { - x: self.x, - y: self.y, - } + self } } diff --git a/src/lib.rs b/src/lib.rs index 287a6c4..968e6f2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,6 +66,7 @@ pub enum ExtendedOption { None, } +/// exports an alias to an value of an enum. #[macro_export] macro_rules! enum_alias { ($enum:ident, $alias:ident, $target:ident) => { @@ -78,6 +79,7 @@ macro_rules! enum_alias { }; } +/// reexports an Constant into an constant of an Trait #[macro_export] macro_rules! predefined_const { ($trait_name:ident, $const:ident, $t:ty) => {