fix lint
This commit is contained in:
parent
88ed94b282
commit
9d46ff4373
|
|
@ -140,7 +140,7 @@ fn main() {
|
||||||
CustomPoint::new(7.0, 8.0, 9.0, 10.0, Label::Human),
|
CustomPoint::new(7.0, 8.0, 9.0, 10.0, Label::Human),
|
||||||
];
|
];
|
||||||
|
|
||||||
println!("Original cloud: {:?}", cloud);
|
println!("Original cloud: {cloud:?}");
|
||||||
|
|
||||||
let msg = PointCloud2Msg::try_from_iter(cloud).unwrap();
|
let msg = PointCloud2Msg::try_from_iter(cloud).unwrap();
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ fn main() {
|
||||||
.filter(|point: &CustomPoint| point.my_custom_label == Label::Deer)
|
.filter(|point: &CustomPoint| point.my_custom_label == Label::Deer)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
println!("Filtered cloud: {:?}", out);
|
println!("Filtered cloud: {out:?}");
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
vec![CustomPoint::new(1.0, 2.0, 3.0, 4.0, Label::Deer),],
|
vec![CustomPoint::new(1.0, 2.0, 3.0, 4.0, Label::Deer),],
|
||||||
|
|
|
||||||
|
|
@ -105,31 +105,31 @@ fn main() {
|
||||||
let how_often = 1_000;
|
let how_often = 1_000;
|
||||||
|
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip);
|
let dur = measure_func_avg(how_often, how_many, roundtrip);
|
||||||
println!("roundtrip: {:?}", dur);
|
println!("roundtrip: {dur:?}");
|
||||||
|
|
||||||
#[cfg(feature = "rayon")]
|
#[cfg(feature = "rayon")]
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip_par);
|
let dur = measure_func_avg(how_often, how_many, roundtrip_par);
|
||||||
println!("roundtrip_par: {:?}", dur);
|
println!("roundtrip_par: {dur:?}");
|
||||||
|
|
||||||
println!("200k");
|
println!("200k");
|
||||||
let how_many = 200_000;
|
let how_many = 200_000;
|
||||||
let how_often = 100;
|
let how_often = 100;
|
||||||
|
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip_filter);
|
let dur = measure_func_avg(how_often, how_many, roundtrip_filter);
|
||||||
println!("roundtrip_filter: {:?}", dur);
|
println!("roundtrip_filter: {dur:?}");
|
||||||
|
|
||||||
#[cfg(feature = "rayon")]
|
#[cfg(feature = "rayon")]
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip_filter_par);
|
let dur = measure_func_avg(how_often, how_many, roundtrip_filter_par);
|
||||||
println!("roundtrip_filter_par: {:?}", dur);
|
println!("roundtrip_filter_par: {dur:?}");
|
||||||
|
|
||||||
println!("10m");
|
println!("10m");
|
||||||
let how_many = 10_000_000;
|
let how_many = 10_000_000;
|
||||||
let how_often = 10;
|
let how_often = 10;
|
||||||
|
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip_filter);
|
let dur = measure_func_avg(how_often, how_many, roundtrip_filter);
|
||||||
println!("roundtrip_filter: {:?}", dur);
|
println!("roundtrip_filter: {dur:?}");
|
||||||
|
|
||||||
#[cfg(feature = "rayon")]
|
#[cfg(feature = "rayon")]
|
||||||
let dur = measure_func_avg(how_often, how_many, roundtrip_filter_par);
|
let dur = measure_func_avg(how_often, how_many, roundtrip_filter_par);
|
||||||
println!("roundtrip_filter_par: {:?}", dur);
|
println!("roundtrip_filter_par: {dur:?}");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ fn main() {
|
||||||
PointXYZ::new(3.0, 3.0, 3.0),
|
PointXYZ::new(3.0, 3.0, 3.0),
|
||||||
];
|
];
|
||||||
|
|
||||||
println!("Original cloud: {:?}", cloud);
|
println!("Original cloud: {cloud:?}");
|
||||||
|
|
||||||
let msg = PointCloud2Msg::try_from_iter(cloud).unwrap();
|
let msg = PointCloud2Msg::try_from_iter(cloud).unwrap();
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ fn main() {
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
println!("Filtered cloud: {:?}", out);
|
println!("Filtered cloud: {out:?}");
|
||||||
|
|
||||||
assert_eq!(vec![PointXYZ::new(1.0, 1.0, 1.0),], out);
|
assert_eq!(vec![PointXYZ::new(1.0, 1.0, 1.0),], out);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue