diff --git a/pkstrings/src/pkstring.rs b/pkstrings/src/pkstring.rs index f2f0a5d..9441d6e 100644 --- a/pkstrings/src/pkstring.rs +++ b/pkstrings/src/pkstring.rs @@ -202,13 +202,13 @@ impl From for Vec { } } -impl From for String { - fn from(pkstr: PKString) -> String { +impl From<&PKString> for String { + fn from(pkstr: &PKString) -> String { let placeholder = '_'; let mut buf = String::new(); - for ord in pkstr.0 { - match hextochr(ord) { + for ord in &pkstr.0 { + match hextochr(*ord) { Some(chr) => buf.push(chr), None => buf.push(placeholder.clone()), }