mirror of
https://codeberg.org/icewind/taspromto.git
synced 2026-08-02 12:14:45 +02:00
formattable trait
This commit is contained in:
parent
7955380859
commit
e13243f9a5
6 changed files with 36 additions and 18 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use jzon::JsonValue;
|
||||
|
||||
use crate::device::BDAddr;
|
||||
use crate::device::{BDAddr, FormattableDevice};
|
||||
use std::{
|
||||
fmt::{self, Debug, Display},
|
||||
time::Instant,
|
||||
|
|
@ -48,8 +48,10 @@ impl MiTempDevice {
|
|||
self.dew_point = dew_point;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn format_open_metrics(&self) -> impl Display + '_ {
|
||||
impl FormattableDevice for MiTempDevice {
|
||||
fn format_open_metrics(&self) -> impl Display + '_ {
|
||||
MitempFormatter { device: self }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue