mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Use array-bytes for All Array/Bytes/Hex Operations (#12190)
* Use `array-bytes` for All Array/Bytes/Hex Operations Signed-off-by: Xavier Lau <xavier@inv.cafe> * Reorder * Self Review * Format * Fix Tests * Bump `array-bytes` * Optimize large test res Signed-off-by: Xavier Lau <xavier@inv.cafe> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -66,7 +66,8 @@ impl InspectNodeKeyCmd {
|
||||
if !self.bin {
|
||||
// With hex input, give to the user a bit of tolerance about whitespaces
|
||||
let keyhex = String::from_utf8_lossy(&file_data);
|
||||
file_data = hex::decode(keyhex.trim()).map_err(|_| "failed to decode secret as hex")?;
|
||||
file_data = array_bytes::hex2bytes(keyhex.trim())
|
||||
.map_err(|_| "failed to decode secret as hex")?;
|
||||
}
|
||||
|
||||
let secret =
|
||||
|
||||
Reference in New Issue
Block a user