diff --git a/src/actions/german/driver.rs b/src/actions/german/driver.rs index a863c7be..f0b4dfcc 100644 --- a/src/actions/german/driver.rs +++ b/src/actions/german/driver.rs @@ -35,7 +35,7 @@ use unicode_titlecase::StrTitleCase; /// # Example: A simple greeting, with Umlaut and Eszett /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let result = action.act("Gruess Gott!"); @@ -48,7 +48,7 @@ use unicode_titlecase::StrTitleCase; /// *elaborate* word list!), but is still handled, as its constituents are. /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let result = action.act("Du Suesswassertagtraeumer!"); @@ -62,7 +62,7 @@ use unicode_titlecase::StrTitleCase; /// [`tr`](https://en.wikipedia.org/wiki/Tr_(Unix))) would not handle this correctly. /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// for word in &[ /// // "ae" @@ -116,7 +116,7 @@ use unicode_titlecase::StrTitleCase; /// /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let result = action.act("aEpFeL"); @@ -133,7 +133,7 @@ use unicode_titlecase::StrTitleCase; /// output is `Äpfel` /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let result: String = action.act("AePfEl"); @@ -145,7 +145,7 @@ use unicode_titlecase::StrTitleCase; /// ## Subexample: other cases /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let f = |word: &str| -> String {action.act(word)}; @@ -212,7 +212,7 @@ use unicode_titlecase::StrTitleCase; /// ([`str`]). /// /// ``` -/// use srgn::{Action, actions::German}; +/// use srgn::actions::{Action, German}; /// /// let action = German::default(); /// let result = action.act("\0Schoener 你好 Satz... 👋🏻\r\n\n"); @@ -294,7 +294,7 @@ impl German { /// much more likely than for Umlauts. /// /// ``` - /// use srgn::{Action, actions::German}; + /// use srgn::actions::{Action, German}; /// /// for (original, output) in &[ /// ("Busse", "Buße"), // busses / penance @@ -317,7 +317,7 @@ impl German { /// Naive mode is essentially forcing a maximum number of replacements. /// /// ``` - /// use srgn::{Action, actions::German}; + /// use srgn::actions::{Action, German}; /// /// for (original, output) in &[ /// ("Frau Schroekedaek", "Frau Schrökedäk"), // Names are not in the word list diff --git a/src/lib.rs b/src/lib.rs index 6a30797e..74640b88 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ #![allow(missing_docs)] #![allow(clippy::module_name_repetitions)] -pub use crate::actions::Action; +use crate::actions::Action; use crate::scoping::ScopedViewBuilder; use log::debug; use scoping::ScopedViewBuildStep; @@ -43,7 +43,7 @@ pub use fancy_regex::Regex as RegexPattern; /// /// /// ``` -/// use srgn::{apply, scoping::{ScopedViewBuildStep, regex::Regex}, actions::German, Action}; +/// use srgn::{apply, scoping::{ScopedViewBuildStep, regex::Regex}, actions::{Action, German}}; /// /// let actions: &[Box] = &[Box::new(German::default())]; /// let scopers: &[Box] = &[Box::new(Regex::default())]; diff --git a/src/main.rs b/src/main.rs index 4842a6ca..9309a73f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,16 +17,20 @@ use srgn::actions::Titlecase; use srgn::actions::Upper; #[cfg(feature = "symbols")] use srgn::actions::{Symbols, SymbolsInversion}; -use srgn::scoping::{ - langs::{ - csharp::{CSharp, CSharpQuery}, - python::{Python, PythonQuery}, - typescript::{TypeScript, TypeScriptQuery}, +use srgn::{ + actions::Action, + apply, + scoping::{ + langs::{ + csharp::{CSharp, CSharpQuery}, + python::{Python, PythonQuery}, + typescript::{TypeScript, TypeScriptQuery}, + }, + literal::Literal, + regex::Regex, + ScopedViewBuildStep, ScoperBuildError, }, - literal::Literal, - ScopedViewBuildStep, ScoperBuildError, }; -use srgn::{apply, scoping::regex::Regex, Action}; use std::io::{self, Error, Read, Write}; fn main() -> Result<(), Error> { diff --git a/tests/properties/lower.rs b/tests/properties/lower.rs index 3c68b561..ad085e85 100644 --- a/tests/properties/lower.rs +++ b/tests/properties/lower.rs @@ -1,11 +1,10 @@ +use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; use proptest::prelude::*; use srgn::{ actions::{Action, Lower}, scoping::ScopedViewBuilder, }; -use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; - proptest! { #![proptest_config(ProptestConfig::with_cases(DEFAULT_NUMBER_OF_TEST_CASES))] #[test] diff --git a/tests/properties/squeeze.rs b/tests/properties/squeeze.rs index 8ae8a304..11910c56 100644 --- a/tests/properties/squeeze.rs +++ b/tests/properties/squeeze.rs @@ -1,8 +1,8 @@ use proptest::prelude::*; use srgn::{ - actions::Squeeze, + actions::{Action, Squeeze}, scoping::{regex::Regex, ScopedViewBuilder}, - Action, RegexPattern, + RegexPattern, }; use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; diff --git a/tests/properties/symbols.rs b/tests/properties/symbols.rs index e3f819fc..520f509c 100644 --- a/tests/properties/symbols.rs +++ b/tests/properties/symbols.rs @@ -1,12 +1,10 @@ +use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; use proptest::prelude::*; use srgn::{ - actions::{Symbols, SymbolsInversion}, + actions::{Action, Symbols, SymbolsInversion}, scoping::ScopedViewBuilder, - Action, }; -use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; - proptest! { #![proptest_config(ProptestConfig::with_cases(DEFAULT_NUMBER_OF_TEST_CASES * 2))] /// Cannot be idempotent on non-ASCII input. Input might contain e.g. en-dash, which diff --git a/tests/properties/upper.rs b/tests/properties/upper.rs index e54a166e..d46cae4a 100644 --- a/tests/properties/upper.rs +++ b/tests/properties/upper.rs @@ -1,7 +1,10 @@ +use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; use proptest::prelude::*; -use srgn::{actions::Upper, scoping::ScopedViewBuilder, Action}; +use srgn::{ + actions::{Action, Upper}, + scoping::ScopedViewBuilder, +}; -use crate::properties::DEFAULT_NUMBER_OF_TEST_CASES; proptest! { #![proptest_config(ProptestConfig::with_cases(DEFAULT_NUMBER_OF_TEST_CASES))] #[test]