mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
format bytes total
This commit is contained in:
parent
94ab229c1b
commit
3d3e0d3b0a
1 changed files with 5 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
use super::{Feature, Subject};
|
use super::{Feature, Subject};
|
||||||
|
use crate::tool::format_bytes;
|
||||||
use ggemini::client::{
|
use ggemini::client::{
|
||||||
connection::response::{data::Text, meta::Status},
|
connection::response::{data::Text, meta::Status},
|
||||||
Client, Request,
|
Client, Request,
|
||||||
|
|
@ -103,7 +104,6 @@ impl Gemini {
|
||||||
)
|
)
|
||||||
// init data to send
|
// init data to send
|
||||||
/* @TODO
|
/* @TODO
|
||||||
use crate::tool::format_bytes;
|
|
||||||
use plurify::ns as plural;
|
use plurify::ns as plural;
|
||||||
|
|
||||||
const CHUNK: usize = 0x400;
|
const CHUNK: usize = 0x400;
|
||||||
|
|
@ -238,7 +238,7 @@ fn handle(
|
||||||
move |_, total| {
|
move |_, total| {
|
||||||
action.update.activate(&format!(
|
action.update.activate(&format!(
|
||||||
"Received {}...",
|
"Received {}...",
|
||||||
crate::tool::format_bytes(total)
|
format_bytes(total)
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -248,8 +248,9 @@ fn handle(
|
||||||
move |result| match result {
|
move |result| match result {
|
||||||
Ok((_, total)) => {
|
Ok((_, total)) => {
|
||||||
action.complete.activate(&format!(
|
action.complete.activate(&format!(
|
||||||
"Saved to {} ({total} bytes total)",
|
"Saved to {} ({} total)",
|
||||||
file.parse_name()
|
file.parse_name(),
|
||||||
|
format_bytes(total)
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue