mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-27 15:34:51 +00:00
Fix precision handling in ClockTime Display impl
This commit is contained in:
parent
580fc603e0
commit
298cb754c9
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ impl fmt::Display for ClockTime {
|
||||||
f.write_fmt(format_args!("{:02}:{:02}:{:02}", h, m, s))
|
f.write_fmt(format_args!("{:02}:{:02}:{:02}", h, m, s))
|
||||||
} else {
|
} else {
|
||||||
let mut divisor = 1;
|
let mut divisor = 1;
|
||||||
let precision = cmp::max(precision, 9);
|
let precision = cmp::min(precision, 9);
|
||||||
for _ in 0..(9 - precision) {
|
for _ in 0..(9 - precision) {
|
||||||
divisor *= 10;
|
divisor *= 10;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue