Skip to content

Commit 5cfa905

Browse files
committed
🔧 Minor refactor
1 parent f9862b5 commit 5cfa905

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
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.2.0"
3+
version = "1.2.1"
44
edition = "2021"
55
authors = ["Nils Wrenger <[email protected]>"]
66
description = "Cli input utilities."

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Displays a string gradually, revealing one character at a time with a specified
9292
use console_utils::reveal;
9393

9494
// Display "Hello World!" with a time interval of 0.1 seconds between each character and a new line after it's finished.
95-
reveal(0.1, "Hello World!", true);
95+
reveal("Hello World!", 0.1, true);
9696
```
9797

9898
For more detailed documentation, please refer to the [generated Rust Docs](https://docs.rs/console-utils/latest/console_utils/).

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ pub fn spinner(mut time: f64, spinner_type: SpinnerType) {
259259
///
260260
/// # Arguments
261261
///
262-
/// * `time_between` - The time interval (in seconds) between each revealed character.
263262
/// * `str` - The string to reveal gradually.
263+
/// * `time_between` - The time interval (in seconds) between each revealed character.
264264
/// * `new_line` - If true, adds a newline character after the revelation.
265265
///
266266
/// # Example
@@ -269,9 +269,9 @@ pub fn spinner(mut time: f64, spinner_type: SpinnerType) {
269269
/// use console_utils::reveal;
270270
///
271271
/// // Display "Hello World!" with a time interval of 0.1 seconds between each character and a new line after it's finished.
272-
/// reveal(0.1, "Hello World!", true);
272+
/// reveal("Hello World!", 0.1, true);
273273
/// ```
274-
pub fn reveal(time_between: f64, str: &str, new_line: bool) {
274+
pub fn reveal(str: &str, time_between: f64, new_line: bool) {
275275
let stdout = Term::buffered_stdout();
276276

277277
for i in 0..str.len() {

tests/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ fn test_spinner() {
3737
#[test]
3838
fn test_reveal() {
3939
// Give the fn the str and time, prints it delayed with a new line.
40-
reveal(0.1, "Hello World!", true);
40+
reveal("Hello World!", 0.1, true);
4141
}

0 commit comments

Comments
 (0)