Skip to content

Commit 1978513

Browse files
committed
🐛 Fixed Docs
1 parent 47166b5 commit 1978513

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "console-utils"
3-
version = "1.1.8"
3+
version = "1.1.9"
44
edition = "2021"
55
authors = ["Nils Wrenger <[email protected]>"]
66
description = "Cli input utilities."

src/lib.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,13 @@ pub enum SpinnerType {
186186
}
187187

188188
impl SpinnerType {
189-
/// Converts the spinner type to a vector of frames.
190-
///
191-
/// # Returns
192-
///
193-
/// Returns a vector of strings representing frames for the spinner, gives back the following variants:
194-
/// - `SpinnerType::Standard`: Standard spinner with characters / - \ |.
195-
/// - `SpinnerType::Dots`: Spinner with dots . .. ... .....
196-
/// - `SpinnerType::Box`: Spinner with box characters ▌ ▀ ▐ ▄.
197-
/// - `SpinnerType::Flip`: Spinner with flip characters _ _ _ - \ ' ´ - _ _ _.
198-
/// - `SpinnerType::Custom(frames)`: Custom spinner with user-defined frames.
199-
fn to_frames(&self) -> Vec<&'static str> {
189+
/// Converts the spinner type to a vector of frames, gives back the following variants:
190+
/// - `SpinnerType::Standard`: Standard spinner with characters / - \ |.
191+
/// - `SpinnerType::Dots`: Spinner with dots . .. ... .....
192+
/// - `SpinnerType::Box`: Spinner with box characters ▌ ▀ ▐ ▄.
193+
/// - `SpinnerType::Flip`: Spinner with flip characters _ _ _ - \ ' ´ - _ _ _.
194+
/// - `SpinnerType::Custom(frames)`: Custom spinner with user-defined frames.
195+
pub fn to_frames(&self) -> Vec<&'static str> {
200196
match self {
201197
SpinnerType::Standard => vec!["/", "-", "\\", "|"],
202198
SpinnerType::Dots => vec![".", "..", "...", "....", "...", ".."],

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ fn test_select() {
2828
#[test]
2929
fn test_spinner() {
3030
// Give the fn the needed time and SpinnerType
31-
spinner(4.2, SpinnerType::Standard);
31+
spinner(1.0, SpinnerType::Standard);
3232

3333
// Custom Spinner
34-
spinner(4.2, SpinnerType::Custom(vec!["1", "2", "3", "4", "3", "2"]))
34+
spinner(1.0, SpinnerType::Custom(vec!["1", "2", "3", "4", "3", "2"]))
3535
}

0 commit comments

Comments
 (0)