diff --git a/Cargo.lock b/Cargo.lock index 8650e56..1f7dc7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,7 +125,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chx" -version = "1.0.0" +version = "1.0.1" dependencies = [ "arboard", "base64", diff --git a/Cargo.toml b/Cargo.toml index 51077e5..aea9c24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chx" -version = "1.0.0" +version = "1.0.1" edition = "2021" [profile.release] diff --git a/src/main.rs b/src/main.rs index 0ae2e49..572b8ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,7 +68,8 @@ impl Chx { self.processed_data = data; } else { // convert to a u8 byte array - let data = self.data.iter().map(|byte| format!(r"\x{:02x}", byte)).collect::(); + let mut data = self.data.iter().map(|byte| format!(r"0x{:02x},", byte)).collect::(); + data.truncate(data.len() - 1); // remove trailing comma self.processed_data = data; }