diff --git a/CREDITS.md b/CREDITS.md index 3ed3b35..16a0e7e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,14 +1,14 @@ # Project Dependencies Package: fyi - Version: 0.11.2 - Generated: 2023-08-24 18:00:37 UTC + Version: 0.11.3 + Generated: 2023-09-15 20:20:07 UTC | Package | Version | Author(s) | License | | ---- | ---- | ---- | ---- | | [argyle](https://github.com/Blobfolio/argyle) | 0.6.8 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [const_fn](https://github.com/taiki-e/const_fn) | 0.4.9 | | Apache-2.0 or MIT | | [dactyl](https://github.com/Blobfolio/dactyl) | 0.5.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | -| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.11.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | +| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.11.3 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | | [num-traits](https://github.com/rust-num/num-traits) | 0.2.16 | The Rust Project Developers | Apache-2.0 or MIT | | [tz-rs](https://github.com/x-hgg-x/tz-rs) | 0.6.14 | x-hgg-x | Apache-2.0 or MIT | | [utc2k](https://github.com/Blobfolio/utc2k) | 0.6.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | diff --git a/fyi/Cargo.toml b/fyi/Cargo.toml index dc78563..9f649fd 100644 --- a/fyi/Cargo.toml +++ b/fyi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fyi" -version = "0.11.2" +version = "0.11.3" license = "WTFPL" authors = ["Blobfolio, LLC. "] edition = "2021" diff --git a/fyi_msg/Cargo.toml b/fyi_msg/Cargo.toml index 20f3661..1f72de4 100644 --- a/fyi_msg/Cargo.toml +++ b/fyi_msg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fyi_msg" -version = "0.11.2" +version = "0.11.3" authors = ["Blobfolio, LLC. "] edition = "2021" rust-version = "1.70" diff --git a/fyi_msg/src/progress/mod.rs b/fyi_msg/src/progress/mod.rs index d6fd7d4..d871009 100644 --- a/fyi_msg/src/progress/mod.rs +++ b/fyi_msg/src/progress/mod.rs @@ -359,6 +359,21 @@ impl ProglessInner { } } + #[inline] + /// # Increment Done by N. + /// + /// Increase the completed count by `n`. This is safer to use than `set_done()` + /// and more efficient than calling `increment()` a million times in a row. + fn increment_n(&self, n: u32) { + if self.running() { + let done = self.done.fetch_add(n, SeqCst) + n; + if done >= self.total() { self.stop() } + else { + self.flags.fetch_or(TICK_DONE | TICK_PERCENT | TICK_BAR, SeqCst); + } + } + } + /// # Remove a task. /// /// This is the equal and opposite companion to `add`. Calling this will @@ -1138,6 +1153,13 @@ impl Progless { /// See the various examples all over this page for more information. pub fn increment(&self) { self.inner.increment(); } + #[inline] + /// # Increment Done by N. + /// + /// Increase the completed count by `n`. This is safer to use than `set_done()` + /// and more efficient than calling `increment()` a million times in a row. + pub fn increment_n(&self, n: u32) { self.inner.increment_n(n); } + #[inline] /// # Remove a task. /// diff --git a/release/man/fyi-blank.1 b/release/man/fyi-blank.1 index 5546d49..d7ee318 100644 --- a/release/man/fyi-blank.1 +++ b/release/man/fyi-blank.1 @@ -1,6 +1,6 @@ -.TH "FYI BLANK" "1" "August 2023" "blank v0.11.2" "User Commands" +.TH "FYI BLANK" "1" "September 2023" "blank v0.11.3" "User Commands" .SH NAME -blank \- Manual page for blank v0.11.2. +blank \- Manual page for blank v0.11.3. .SH DESCRIPTION Print blank line(s). .SS USAGE: diff --git a/release/man/fyi-confirm.1 b/release/man/fyi-confirm.1 index 9a5402d..63d9b6d 100644 --- a/release/man/fyi-confirm.1 +++ b/release/man/fyi-confirm.1 @@ -1,6 +1,6 @@ -.TH "FYI CONFIRM" "1" "August 2023" "confirm v0.11.2" "User Commands" +.TH "FYI CONFIRM" "1" "September 2023" "confirm v0.11.3" "User Commands" .SH NAME -confirm \- Manual page for confirm v0.11.2. +confirm \- Manual page for confirm v0.11.3. .SH DESCRIPTION Ask a Yes/No question using the built\-in prefix "confirm". .SS USAGE: diff --git a/release/man/fyi-crunched.1 b/release/man/fyi-crunched.1 index 4f0e828..b752f03 100644 --- a/release/man/fyi-crunched.1 +++ b/release/man/fyi-crunched.1 @@ -1,6 +1,6 @@ -.TH "FYI CRUNCHED" "1" "August 2023" "crunched v0.11.2" "User Commands" +.TH "FYI CRUNCHED" "1" "September 2023" "crunched v0.11.3" "User Commands" .SH NAME -crunched \- Manual page for crunched v0.11.2. +crunched \- Manual page for crunched v0.11.3. .SH DESCRIPTION Crunched: Hello World .SS USAGE: diff --git a/release/man/fyi-debug.1 b/release/man/fyi-debug.1 index b9a11c0..8cee1e5 100644 --- a/release/man/fyi-debug.1 +++ b/release/man/fyi-debug.1 @@ -1,6 +1,6 @@ -.TH "FYI DEBUG" "1" "August 2023" "debug v0.11.2" "User Commands" +.TH "FYI DEBUG" "1" "September 2023" "debug v0.11.3" "User Commands" .SH NAME -debug \- Manual page for debug v0.11.2. +debug \- Manual page for debug v0.11.3. .SH DESCRIPTION Debug: Hello World .SS USAGE: diff --git a/release/man/fyi-done.1 b/release/man/fyi-done.1 index a19c46e..107fe21 100644 --- a/release/man/fyi-done.1 +++ b/release/man/fyi-done.1 @@ -1,6 +1,6 @@ -.TH "FYI DONE" "1" "August 2023" "done v0.11.2" "User Commands" +.TH "FYI DONE" "1" "September 2023" "done v0.11.3" "User Commands" .SH NAME -done \- Manual page for done v0.11.2. +done \- Manual page for done v0.11.3. .SH DESCRIPTION Done: Hello World .SS USAGE: diff --git a/release/man/fyi-error.1 b/release/man/fyi-error.1 index dc17525..e117dd8 100644 --- a/release/man/fyi-error.1 +++ b/release/man/fyi-error.1 @@ -1,6 +1,6 @@ -.TH "FYI ERROR" "1" "August 2023" "error v0.11.2" "User Commands" +.TH "FYI ERROR" "1" "September 2023" "error v0.11.3" "User Commands" .SH NAME -error \- Manual page for error v0.11.2. +error \- Manual page for error v0.11.3. .SH DESCRIPTION Error: Hello World .SS USAGE: diff --git a/release/man/fyi-info.1 b/release/man/fyi-info.1 index 6883fa1..a08300c 100644 --- a/release/man/fyi-info.1 +++ b/release/man/fyi-info.1 @@ -1,6 +1,6 @@ -.TH "FYI INFO" "1" "August 2023" "info v0.11.2" "User Commands" +.TH "FYI INFO" "1" "September 2023" "info v0.11.3" "User Commands" .SH NAME -info \- Manual page for info v0.11.2. +info \- Manual page for info v0.11.3. .SH DESCRIPTION Info: Hello World .SS USAGE: diff --git a/release/man/fyi-notice.1 b/release/man/fyi-notice.1 index 3c0309c..68b2ec3 100644 --- a/release/man/fyi-notice.1 +++ b/release/man/fyi-notice.1 @@ -1,6 +1,6 @@ -.TH "FYI NOTICE" "1" "August 2023" "notice v0.11.2" "User Commands" +.TH "FYI NOTICE" "1" "September 2023" "notice v0.11.3" "User Commands" .SH NAME -notice \- Manual page for notice v0.11.2. +notice \- Manual page for notice v0.11.3. .SH DESCRIPTION Notice: Hello World .SS USAGE: diff --git a/release/man/fyi-print.1 b/release/man/fyi-print.1 index 92025c0..6e48a23 100644 --- a/release/man/fyi-print.1 +++ b/release/man/fyi-print.1 @@ -1,6 +1,6 @@ -.TH "FYI PRINT" "1" "August 2023" "print v0.11.2" "User Commands" +.TH "FYI PRINT" "1" "September 2023" "print v0.11.3" "User Commands" .SH NAME -print \- Manual page for print v0.11.2. +print \- Manual page for print v0.11.3. .SH DESCRIPTION Print a message without a prefix (or with a custom one). .SS USAGE: diff --git a/release/man/fyi-review.1 b/release/man/fyi-review.1 index 31ef169..05d30c9 100644 --- a/release/man/fyi-review.1 +++ b/release/man/fyi-review.1 @@ -1,6 +1,6 @@ -.TH "FYI REVIEW" "1" "August 2023" "review v0.11.2" "User Commands" +.TH "FYI REVIEW" "1" "September 2023" "review v0.11.3" "User Commands" .SH NAME -review \- Manual page for review v0.11.2. +review \- Manual page for review v0.11.3. .SH DESCRIPTION Review: Hello World .SS USAGE: diff --git a/release/man/fyi-success.1 b/release/man/fyi-success.1 index f0ba725..4e40d99 100644 --- a/release/man/fyi-success.1 +++ b/release/man/fyi-success.1 @@ -1,6 +1,6 @@ -.TH "FYI SUCCESS" "1" "August 2023" "success v0.11.2" "User Commands" +.TH "FYI SUCCESS" "1" "September 2023" "success v0.11.3" "User Commands" .SH NAME -success \- Manual page for success v0.11.2. +success \- Manual page for success v0.11.3. .SH DESCRIPTION Success: Hello World .SS USAGE: diff --git a/release/man/fyi-task.1 b/release/man/fyi-task.1 index 9c00c80..3c50c22 100644 --- a/release/man/fyi-task.1 +++ b/release/man/fyi-task.1 @@ -1,6 +1,6 @@ -.TH "FYI TASK" "1" "August 2023" "task v0.11.2" "User Commands" +.TH "FYI TASK" "1" "September 2023" "task v0.11.3" "User Commands" .SH NAME -task \- Manual page for task v0.11.2. +task \- Manual page for task v0.11.3. .SH DESCRIPTION Task: Hello World .SS USAGE: diff --git a/release/man/fyi-warning.1 b/release/man/fyi-warning.1 index 0d1c0b2..6647eb9 100644 --- a/release/man/fyi-warning.1 +++ b/release/man/fyi-warning.1 @@ -1,6 +1,6 @@ -.TH "FYI WARNING" "1" "August 2023" "warning v0.11.2" "User Commands" +.TH "FYI WARNING" "1" "September 2023" "warning v0.11.3" "User Commands" .SH NAME -warning \- Manual page for warning v0.11.2. +warning \- Manual page for warning v0.11.3. .SH DESCRIPTION Warning: Hello World .SS USAGE: diff --git a/release/man/fyi.1 b/release/man/fyi.1 index a52f6df..e58bc3a 100644 --- a/release/man/fyi.1 +++ b/release/man/fyi.1 @@ -1,6 +1,6 @@ -.TH "FYI" "1" "August 2023" "FYI v0.11.2" "User Commands" +.TH "FYI" "1" "September 2023" "FYI v0.11.3" "User Commands" .SH NAME -FYI \- Manual page for fyi v0.11.2. +FYI \- Manual page for fyi v0.11.3. .SH DESCRIPTION A dead\-simple CLI status message printer for use in BASH scripts, etc. .SS USAGE: