mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +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 {
|
||||
fn into(self) -> String {
|
||||
let mut out = String::new();
|
||||
impl core::fmt::Display for ProcessKey {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
for i in self.0 {
|
||||
out.push_str(&format!("{:02x}", i));
|
||||
write!(f, "{:02x}", i)?;
|
||||
}
|
||||
out
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue