summaryrefslogtreecommitdiff
path: root/src/attributes
diff options
context:
space:
mode:
authorseancarroll <seanc28@gmail.com>2021-01-09 22:44:40 -0600
committerseancarroll <seanc28@gmail.com>2021-01-09 22:44:40 -0600
commitc3a01f5353013b82ec3048969f48e1f229a88c48 (patch)
tree629b641cdb202c7b0bf372ad688bde8da520d0b2 /src/attributes
parent16bf6f3f1a132c61e40a0137d69c1b53bbf7bd59 (diff)
downloaddotavious-c3a01f5353013b82ec3048969f48e1f229a88c48.zip
cargo fmt
Diffstat (limited to 'src/attributes')
-rw-r--r--src/attributes/port_position.rs10
-rw-r--r--src/attributes/rectangle.rs17
2 files changed, 16 insertions, 11 deletions
diff --git a/src/attributes/port_position.rs b/src/attributes/port_position.rs
index 8900219..1948b8e 100644
--- a/src/attributes/port_position.rs
+++ b/src/attributes/port_position.rs
@@ -37,7 +37,7 @@ impl<'a> DotString<'a> for PortPosition {
#[cfg(test)]
mod test {
- use crate::attributes::{PortPosition, CompassPoint};
+ use crate::attributes::{CompassPoint, PortPosition};
use crate::DotString;
#[test]
@@ -47,14 +47,16 @@ mod test {
PortPosition::Port {
port_name: "port_0".to_string(),
compass_point: None
- }.dot_string()
+ }
+ .dot_string()
);
assert_eq!(
"port_0:ne",
PortPosition::Port {
port_name: "port_0".to_string(),
compass_point: Some(CompassPoint::NE)
- }.dot_string()
+ }
+ .dot_string()
);
}
@@ -62,4 +64,4 @@ mod test {
fn compass_dot_string() {
assert_eq!("ne", PortPosition::Compass(CompassPoint::NE).dot_string());
}
-} \ No newline at end of file
+}
diff --git a/src/attributes/rectangle.rs b/src/attributes/rectangle.rs
index 9b36ee2..acf9ae1 100644
--- a/src/attributes/rectangle.rs
+++ b/src/attributes/rectangle.rs
@@ -19,15 +19,18 @@ impl<'a> DotString<'a> for Rectangle {
#[cfg(test)]
mod test {
- use crate::attributes::{Rectangle, Point};
+ use crate::attributes::{Point, Rectangle};
use crate::DotString;
#[test]
fn dot_string() {
- assert_eq!("0.0,0.0,1.0,1.0", Rectangle {
- lower_left: Point::new_2d(0.0, 0.0),
- upper_right: Point::new_2d(1.0, 1.0)
- }.dot_string());
+ assert_eq!(
+ "0.0,0.0,1.0,1.0",
+ Rectangle {
+ lower_left: Point::new_2d(0.0, 0.0),
+ upper_right: Point::new_2d(1.0, 1.0)
+ }
+ .dot_string()
+ );
}
-
-} \ No newline at end of file
+}