mirror of
https://github.com/OMGeeky/twitch_data.git
synced 2026-02-23 15:50:00 +01:00
fix oversight
This commit is contained in:
@@ -549,9 +549,10 @@ impl<'a> TwitchClient<'a> {
|
|||||||
fn create_progress_indicator(
|
fn create_progress_indicator(
|
||||||
amount_of_parts: usize,
|
amount_of_parts: usize,
|
||||||
report_frequency: Duration,
|
report_frequency: Duration,
|
||||||
title: impl Into<&str>,
|
title: impl Into<String>,
|
||||||
) -> (Arc<AtomicUsize>, JoinHandle<()>) {
|
) -> (Arc<AtomicUsize>, JoinHandle<()>) {
|
||||||
let completed = Arc::new(AtomicUsize::new(0));
|
let completed = Arc::new(AtomicUsize::new(0));
|
||||||
|
let title = title.into();
|
||||||
let progress_handle = {
|
let progress_handle = {
|
||||||
let completed = Arc::clone(&completed);
|
let completed = Arc::clone(&completed);
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
@@ -560,7 +561,7 @@ impl<'a> TwitchClient<'a> {
|
|||||||
let current_progress = completed.load(Ordering::Relaxed);
|
let current_progress = completed.load(Ordering::Relaxed);
|
||||||
info!(
|
info!(
|
||||||
"{}: {:>6.2}% ({}/{})",
|
"{}: {:>6.2}% ({}/{})",
|
||||||
title.into(),
|
title,
|
||||||
(current_progress as f64 / amount_of_parts as f64) * 100.0,
|
(current_progress as f64 / amount_of_parts as f64) * 100.0,
|
||||||
current_progress,
|
current_progress,
|
||||||
amount_of_parts
|
amount_of_parts
|
||||||
|
|||||||
Reference in New Issue
Block a user