From bef1fec27cee18e9ce39294b44fd8c728fbdf534 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 19 Mar 2023 23:19:19 -0400 Subject: [PATCH] Cleanup imports --- spatial-coordinate-systems/src/common.rs | 2 +- spatial-coordinate-systems/src/dd.rs | 9 +++------ spatial-coordinate-systems/src/dms.rs | 8 +++----- spatial-coordinate-systems/src/lib.rs | 2 -- spatial-coordinate-systems/src/plus.rs | 9 ++------- spatial-coordinate-systems/src/utm.rs | 13 +++++-------- 6 files changed, 14 insertions(+), 29 deletions(-) diff --git a/spatial-coordinate-systems/src/common.rs b/spatial-coordinate-systems/src/common.rs index 1774672..f113fc1 100644 --- a/spatial-coordinate-systems/src/common.rs +++ b/spatial-coordinate-systems/src/common.rs @@ -1,4 +1,4 @@ -use dms_coordinates::{Bearing, DMS}; + use nom::{ branch::alt, bytes::complete::{tag_no_case, take_while1}, diff --git a/spatial-coordinate-systems/src/dd.rs b/spatial-coordinate-systems/src/dd.rs index 9ea101f..d9cdbf3 100644 --- a/spatial-coordinate-systems/src/dd.rs +++ b/spatial-coordinate-systems/src/dd.rs @@ -1,13 +1,10 @@ use crate::{ - common::{optional_separator, parse_direction}, - Direction, + common::{optional_separator}, }; use nom::{ - branch::alt, - character::complete::{self, space0, space1}, - combinator::{eof, map, map_opt, map_res, opt}, + combinator::{map_opt}, number::complete::double, - sequence::{pair, tuple}, + sequence::{tuple}, IResult, }; use std::str::FromStr; diff --git a/spatial-coordinate-systems/src/dms.rs b/spatial-coordinate-systems/src/dms.rs index 0d35fdc..20d0314 100644 --- a/spatial-coordinate-systems/src/dms.rs +++ b/spatial-coordinate-systems/src/dms.rs @@ -5,11 +5,9 @@ use crate::{ use dms_coordinates::Bearing; pub use dms_coordinates::DMS; use nom::{ - branch::alt, - character::complete::{self, space0, space1}, - combinator::{eof, map, map_opt, map_res, opt}, - number::complete::double, - sequence::{pair, tuple}, + character::complete::{self}, + combinator::{map, map_opt}, + sequence::{tuple}, IResult, }; use std::str::FromStr; diff --git a/spatial-coordinate-systems/src/lib.rs b/spatial-coordinate-systems/src/lib.rs index 9bd46e1..0d22b4f 100644 --- a/spatial-coordinate-systems/src/lib.rs +++ b/spatial-coordinate-systems/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(unused_imports)] - use std::str::FromStr; mod common; pub mod dd; diff --git a/spatial-coordinate-systems/src/plus.rs b/spatial-coordinate-systems/src/plus.rs index 7a4c90c..790e17e 100644 --- a/spatial-coordinate-systems/src/plus.rs +++ b/spatial-coordinate-systems/src/plus.rs @@ -1,14 +1,9 @@ use crate::{ - common::{optional_separator, parse_direction}, - Direction, LatLon, + LatLon, }; use nom::{ - branch::alt, bytes::complete::take_while, - character::complete::{self, space0, space1}, - combinator::{eof, map, map_opt, map_res, opt}, - number::complete::double, - sequence::{pair, tuple}, + combinator::{map_opt}, IResult, }; use std::str::FromStr; diff --git a/spatial-coordinate-systems/src/utm.rs b/spatial-coordinate-systems/src/utm.rs index 67051f3..88b861a 100644 --- a/spatial-coordinate-systems/src/utm.rs +++ b/spatial-coordinate-systems/src/utm.rs @@ -1,18 +1,15 @@ use crate::{ - common::{optional_separator, parse_direction, parse_f64}, - Direction, LatLon, + common::{parse_direction, parse_f64}, LatLon, }; use nom::{ - branch::alt, - bytes::complete::{take, take_while}, + bytes::complete::{take}, character::complete::{self, space0, space1}, - combinator::{eof, map, map_opt, map_res, opt}, - number::complete::double, - sequence::{pair, tuple}, + combinator::{map_opt, opt}, + sequence::{tuple}, IResult, }; use std::str::FromStr; -use utm::WSG84ToLatLonError; + #[derive(PartialEq, Debug)] pub struct Coordinate {