diff --git a/spatial-coordinate-systems/src/all.rs b/spatial-coordinate-systems/src/all.rs index c01af50..0a52432 100644 --- a/spatial-coordinate-systems/src/all.rs +++ b/spatial-coordinate-systems/src/all.rs @@ -7,7 +7,7 @@ use crate::{ dmm, dms, plus, //xpin - skyvector, + sky_vector, utm, Coordinate, Error, @@ -26,7 +26,7 @@ pub struct Coordinates { pub utm: utm::Coordinate, // pub xpin: xpin::Xpin, pub plus: plus::Coordinate, - pub skyvector: skyvector::Coordinate, + pub sky_vector: sky_vector::Coordinate, } impl TryFrom for Coordinates { @@ -40,7 +40,7 @@ impl TryFrom for Coordinates { dmm: dmm::Coordinate::from(latlon), utm: utm::Coordinate::try_from(latlon)?, plus: plus::Coordinate::try_from(latlon)?, - skyvector: skyvector::Coordinate::from(latlon), + sky_vector: sky_vector::Coordinate::from(latlon), }) } } diff --git a/spatial-coordinate-systems/src/lib.rs b/spatial-coordinate-systems/src/lib.rs index 747823b..9887a89 100644 --- a/spatial-coordinate-systems/src/lib.rs +++ b/spatial-coordinate-systems/src/lib.rs @@ -6,7 +6,7 @@ pub mod dmm; pub mod dms; pub mod latlon; pub mod plus; -pub mod skyvector; +pub mod sky_vector; pub mod urls; pub mod utm; pub use error::Error; @@ -88,7 +88,7 @@ pub enum Coordinate { UTM(utm::Coordinate), // Xpin(xpin::Xpin), Plus(plus::Coordinate), - Skyvector(skyvector::Coordinate), + SkyVector(sky_vector::Coordinate), } impl Coordinate { @@ -108,7 +108,7 @@ impl Coordinate { map(dd::Coordinate::parse, Coordinate::DD), // map(xpin::Coordinate::parse, Cordinate::Xpin), map(plus::Coordinate::parse, Coordinate::Plus), - map(skyvector::Coordinate::parse, Coordinate::Skyvector), + map(sky_vector::Coordinate::parse, Coordinate::SkyVector), // Try to parse as a URL last map(urls::CoordinateUrls::parse, |coordinate_urls| { Coordinate::DD(dd::Coordinate::from(coordinate_urls.latlon)) @@ -130,7 +130,7 @@ impl Coordinate { CoordinateType::DMM => Self::DMM(dmm::Coordinate::from(lat_lon)), CoordinateType::UTM => Self::UTM(utm::Coordinate::try_from(lat_lon)?), CoordinateType::Plus => Self::Plus(plus::Coordinate::try_from(lat_lon)?), - CoordinateType::Skyvector => Self::Skyvector(skyvector::Coordinate::from(lat_lon)), + CoordinateType::SkyVector => Self::SkyVector(sky_vector::Coordinate::from(lat_lon)), }) } @@ -142,7 +142,7 @@ impl Coordinate { Self::UTM(_) => CoordinateType::UTM, // Self::Xpin(_) => CoordinateType::Xpin, Self::Plus(_) => CoordinateType::Plus, - Self::Skyvector(_) => CoordinateType::Skyvector, + Self::SkyVector(_) => CoordinateType::SkyVector, } } } @@ -162,7 +162,7 @@ impl From<&Coordinate> for LatLon { Coordinate::UTM(utm) => utm.into(), // Coordinate::Xpin(xpin) => xpin.into(), Coordinate::Plus(plus) => plus.into(), - Coordinate::Skyvector(skyvector) => skyvector.into(), + Coordinate::SkyVector(sky_vector) => sky_vector.into(), } } } @@ -206,9 +206,9 @@ impl From for Coordinate { Self::Plus(c) } } -impl From for Coordinate { - fn from(c: skyvector::Coordinate) -> Self { - Self::Skyvector(c) +impl From for Coordinate { + fn from(c: sky_vector::Coordinate) -> Self { + Self::SkyVector(c) } } @@ -245,7 +245,7 @@ impl fmt::Display for Coordinate { Coordinate::DMS(dms) => write!(f, "{}", dms), Coordinate::UTM(utm) => write!(f, "{}", utm), Coordinate::Plus(plus) => write!(f, "{}", plus), - Coordinate::Skyvector(skyvector) => write!(f, "{}", skyvector), + Coordinate::SkyVector(sky_vector) => write!(f, "{}", sky_vector), } } } diff --git a/spatial-coordinate-systems/src/skyvector.rs b/spatial-coordinate-systems/src/sky_vector.rs similarity index 99% rename from spatial-coordinate-systems/src/skyvector.rs rename to spatial-coordinate-systems/src/sky_vector.rs index cd4b294..2cb055a 100644 --- a/spatial-coordinate-systems/src/skyvector.rs +++ b/spatial-coordinate-systems/src/sky_vector.rs @@ -96,7 +96,7 @@ impl Coordinate { ) } - pub fn get_skyvector(&self) -> &str { + pub fn get_sky_vector(&self) -> &str { &self.0 } } diff --git a/xpin-wasm/src/lib.rs b/xpin-wasm/src/lib.rs index f27db4c..c23c68e 100644 --- a/xpin-wasm/src/lib.rs +++ b/xpin-wasm/src/lib.rs @@ -74,8 +74,8 @@ pub struct Coordinates { // pub xpin: String, #[wasm_bindgen(js_name = "Plus")] pub plus: String, - #[wasm_bindgen(js_name = "Skyvector")] - pub skyvector: String, + #[wasm_bindgen(js_name = "SkyVector")] + pub sky_vector: String, } impl From<&spatial_coordinate_systems::all::Coordinates> for Coordinates { @@ -86,7 +86,7 @@ impl From<&spatial_coordinate_systems::all::Coordinates> for Coordinates { dmm: value.dmm.to_string(), utm: value.utm.to_string(), plus: value.plus.to_string(), - skyvector: value.skyvector.to_string(), + sky_vector: value.sky_vector.to_string(), } } }