From 3b12d72952ab717cdd5214004cd387597c52f196 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 12 May 2023 17:16:55 -0400 Subject: [PATCH] Update components --- src/lib.rs | 5 +++++ tests/algorithm.rs | 2 ++ words/build.rs | 2 +- words/src/lib.rs | 8 ++++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 38d367a..2d1c55b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -296,6 +296,11 @@ mod tests { assert!(dbg!(Address::from_str("6532 BROADCAST TINY apple")).is_ok()); assert!(dbg!(Address::from_str("6532 BROADCAST TINY orange")).is_ok()); assert!(dbg!(Address::from_lat_lon(0.0, 0.0)).is_ok()); + assert!(dbg!(Address::from_lat_lon( + 69.79268710495744, + -108.23886036872865 + )) + .is_ok()); } #[test] diff --git a/tests/algorithm.rs b/tests/algorithm.rs index 5bd43e8..4c99888 100644 --- a/tests/algorithm.rs +++ b/tests/algorithm.rs @@ -1,3 +1,5 @@ +use std::str::FromStr; + use common::test_events; use s2::cellid::CellID; use xpin::Error; diff --git a/words/build.rs b/words/build.rs index ad8d1b5..c242b35 100644 --- a/words/build.rs +++ b/words/build.rs @@ -13,7 +13,7 @@ fn main() { let mut file = BufWriter::new(File::create(path).unwrap()); let wordlist_path = "../wordlist/99-wordlist.csv"; - println!("cargo:rerun-if-changed={}", wordlist_path); + // println!("cargo:rerun-if-changed={}", wordlist_path); let rdr_builder = ReaderBuilder::new(); diff --git a/words/src/lib.rs b/words/src/lib.rs index 97e2992..483a50a 100644 --- a/words/src/lib.rs +++ b/words/src/lib.rs @@ -25,7 +25,7 @@ impl Display for Word<'_> { /// ```rust /// use words::get_number; /// -/// assert!(get_number("ThE").is_some()); +/// assert!(get_number("TElescoPE").is_some()); /// assert!(get_number("AsDf").is_none()); /// ``` pub fn get_number(maybe_word: S) -> Option @@ -40,9 +40,9 @@ where /// ```rust /// use words::get_word; /// -/// assert!(get_word("THE").is_some()); -/// assert!(get_word("the").is_some()); -/// assert!(get_word("tHe").is_some()); +/// assert!(get_word("TELESCOPE").is_some()); +/// assert!(get_word("TelescopE").is_some()); +/// assert!(get_word("telescope").is_some()); /// assert!(get_word("ASDFASDF").is_none()); /// ``` pub fn get_word(maybe_word: S) -> Option<&'static Word<'static>>