Skip to content

Commit

Permalink
Fixed formating
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenEverson committed Feb 23, 2024
1 parent 5c8708e commit 8877b2f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ pub struct Point {
///```
macro_rules! point {
($x:expr, $y:expr, $z:expr) => {
Point{
Point {
x: $x as f64,
y: $y as f64,
z: $z as f64
z: $z as f64,
}
};
($x:expr, $y:expr) => {
Point{
Point {
x: $x as f64,
y: $y as f64,
z: 0.0
z: 0.0,
}
};
($x:expr) => {
Point{
Point {
x: $x as f64,
y: 0.0,
z: 0.0
z: 0.0,
}
};
}
Expand Down Expand Up @@ -93,7 +93,7 @@ mod tests {
assert_eq!(t, p.tuple())
}
#[test]
fn test_point_macro(){
fn test_point_macro() {
let p = point!(1, 2, 3.5);
assert_eq!(p.x, 1.0);
assert_eq!(p.y, 2.0);
Expand Down

0 comments on commit 8877b2f

Please sign in to comment.