Put something in main

This commit is contained in:
expectocode 2019-12-31 02:10:55 +00:00
parent 6d8852260e
commit 7e91144ae2
1 changed files with 12 additions and 0 deletions

View File

@ -1,8 +1,20 @@
mod geometry; mod geometry;
mod stream_algos; mod stream_algos;
use geometry::{Point, Rectangle};
fn main() { fn main() {
let p = geometry::Point::new(2, 3); let p = geometry::Point::new(2, 3);
let y = p; let y = p;
dbg!(p + y); dbg!(p + y);
let various = vec![
Rectangle::from_corner_width_height(Point::new(20, 110), 10, 10),
Rectangle::from_corner_width_height(Point::new(25, 115), 10, 10),
Rectangle::from_corner_width_height(Point::new(10, 100), 1000, 1000),
Rectangle::from_corner_width_height(Point::new(2010, 2100), 1, 1),
];
let r: Vec<_> = stream_algos::translate(various.clone().drain(0..), Point::new(1, 2)).collect();
dbg!(&r);
} }