Dieser Commit ist enthalten in:
Sebastian Tobie 2024-12-19 08:02:42 +01:00
Ursprung 55b3cd16f7
Commit b67724378f
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -4,6 +4,7 @@ use crate::predefined_const;
use super::Kartesian; use super::Kartesian;
/// implements an method that turns an Kartesian of all sizes into Coordinates
macro_rules! to_coords_impl { macro_rules! to_coords_impl {
($subtype:ident) => { ($subtype:ident) => {
impl ToCoords for Kartesian<$subtype> { impl ToCoords for Kartesian<$subtype> {
@ -63,9 +64,6 @@ to_coords_impl!(u128);
impl ToCoords for Kartesian<usize> { impl ToCoords for Kartesian<usize> {
fn to_coords(self) -> Kartesian<usize> { fn to_coords(self) -> Kartesian<usize> {
Kartesian { self
x: self.x,
y: self.y,
}
} }
} }

Datei anzeigen

@ -66,6 +66,7 @@ pub enum ExtendedOption<T> {
None, None,
} }
/// exports an alias to an value of an enum.
#[macro_export] #[macro_export]
macro_rules! enum_alias { macro_rules! enum_alias {
($enum:ident, $alias:ident, $target:ident) => { ($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_export]
macro_rules! predefined_const { macro_rules! predefined_const {
($trait_name:ident, $const:ident, $t:ty) => { ($trait_name:ident, $const:ident, $t:ty) => {