Fix padding in internet time
This commit is contained in:
parent
8e968f13e6
commit
f85d9b4910
|
@ -19,8 +19,10 @@ pub async fn internet_time_stream(config: InternetTimeConfig) {
|
||||||
let internet_time = seconds / 86.4;
|
let internet_time = seconds / 86.4;
|
||||||
yield Ok(Block {
|
yield Ok(Block {
|
||||||
full_text: format!(
|
full_text: format!(
|
||||||
"@{time:03.prec$}",
|
"@{time:0width$.prec$}",
|
||||||
time = internet_time,
|
time = internet_time,
|
||||||
|
// 3 digits + and decimal point
|
||||||
|
width = config.precision as usize + 4,
|
||||||
prec = config.precision as usize
|
prec = config.precision as usize
|
||||||
)
|
)
|
||||||
.into_boxed_str(),
|
.into_boxed_str(),
|
||||||
|
|
Loading…
Reference in a new issue