chore: rmcp 0.5.0 (#3935)

This commit is contained in:
Jack Amadeo
2025-08-07 21:07:03 -04:00
committed by GitHub
parent 16304121ef
commit 43d6d1a492
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -829,11 +829,11 @@ impl McpSpinners {
spinner.set_message(message.to_string());
}
pub fn update(&mut self, token: &str, value: u32, total: Option<u32>, message: Option<&str>) {
pub fn update(&mut self, token: &str, value: f64, total: Option<f64>, message: Option<&str>) {
let bar = self.bars.entry(token.to_string()).or_insert_with(|| {
if let Some(total) = total {
self.multi_bar.add(
ProgressBar::new((total * 100) as u64).with_style(
ProgressBar::new((total * 100_f64) as u64).with_style(
ProgressStyle::with_template("[{elapsed}] {bar:40} {pos:>3}/{len:3} {msg}")
.unwrap(),
),
@@ -842,7 +842,7 @@ impl McpSpinners {
self.multi_bar.add(ProgressBar::new_spinner())
}
});
bar.set_position((value * 100) as u64);
bar.set_position((value * 100_f64) as u64);
if let Some(msg) = message {
bar.set_message(msg.to_string());
}