diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3dfa818..d869c7e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Only hard requirement is that all tags which are used to create release builds * ## Formatting -Code should be formatted with [`cargo fmt`](https://github.com/rust-lang/rustfmt) and linted with [`cargo clippy`](https://github.com/rust-lang/rust-clippy). +Code should be formatted with [`cargo +nightly fmt`](https://github.com/rust-lang/rustfmt) and linted with [`cargo clippy`](https://github.com/rust-lang/rust-clippy). ## Releasing a new version diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..a62b094 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +imports_granularity="Crate" +group_imports="One" diff --git a/rustfmt.toml.disabled b/rustfmt.toml.disabled deleted file mode 100644 index 332d37a..0000000 --- a/rustfmt.toml.disabled +++ /dev/null @@ -1,5 +0,0 @@ -# You can use this file to keep the imports formatted with `cargo +nightly fmt` -# This config uses some nightly options, so it has the .disabled extension to avoid it from causing errors on stable - -imports_granularity="Crate" -group_imports="One" diff --git a/src/interactive/prompt.rs b/src/interactive/prompt.rs index dfec77d..933f869 100644 --- a/src/interactive/prompt.rs +++ b/src/interactive/prompt.rs @@ -24,7 +24,7 @@ const POLL_RATE: u64 = 1000; /// display an interactive prompt to ask the user to select an item /// /// example: -/// ``` +/// ```ignore /// let prompt = "Choose your organization:"; /// let items = vec![String::from("Eka"), String::from("Toka"), String::from("Kolmas"), /// String::from("Neljäs")]; diff --git a/src/interactive/state.rs b/src/interactive/state.rs index c23ee02..ca84d13 100644 --- a/src/interactive/state.rs +++ b/src/interactive/state.rs @@ -69,7 +69,8 @@ impl<'a, T: Clone> StatefulList<'a, T> { /// /// Example: /// -/// ``` +/// ```ignore +/// # use tmc::interactive::state::AppState; /// let items = &["Eka", "Toka", "Kolmas"]; /// let mut app = AppState::new(items); /// @@ -140,7 +141,6 @@ impl<'a> AppState<'a> { #[cfg(test)] mod tests { - use super::AppState; fn get_item_list() -> &'static [&'static str] {