mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
xous-rs: Implement Display instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
parent
5971507410
commit
3cbcf7b7e4
1 changed files with 5 additions and 5 deletions
|
|
@ -12,13 +12,13 @@ impl ProcessKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<String> for ProcessKey {
|
impl core::fmt::Display for ProcessKey {
|
||||||
fn into(self) -> String {
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
let mut out = String::new();
|
|
||||||
for i in self.0 {
|
for i in self.0 {
|
||||||
out.push_str(&format!("{:02x}", i));
|
write!(f, "{:02x}", i)?;
|
||||||
}
|
}
|
||||||
out
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue