Remove serde (#23)
This commit is contained in:
@@ -8,4 +8,3 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.163", features = [ "derive" ] }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use serde::Serialize;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct CoordinatePair {
|
||||
pub x0: f64,
|
||||
pub y0: f64,
|
||||
@@ -8,7 +7,22 @@ pub struct CoordinatePair {
|
||||
pub y1: f64,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
impl Debug for CoordinatePair {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_fmt(format_args!(
|
||||
"x0: {} ({:?}), y0: {} ({:?}), x1: {} ({:?}), y1: {} ({:?})",
|
||||
self.x0,
|
||||
self.x0.to_be_bytes(),
|
||||
self.y0,
|
||||
self.y0.to_be_bytes(),
|
||||
self.x1,
|
||||
self.x1.to_be_bytes(),
|
||||
self.y1,
|
||||
self.y1.to_be_bytes()
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
pub struct HaversineData {
|
||||
pub pairs: Vec<CoordinatePair>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user