Skip to content

Commit

Permalink
better escapting of string literals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Starke committed Jul 7, 2023
1 parent 8ca878c commit c0cb138
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nt_hive2"
version = "3.1.0"
version = "3.1.1"
edition = "2021"
authors = ["Jan Starke <[email protected]>", "Muteb Alqahtani <[email protected]>"]
license = "GPL-3.0"
Expand Down
12 changes: 6 additions & 6 deletions src/vk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,18 +273,18 @@ impl Display for RegistryValue {
match self {
RegistryValue::RegUnknown => write!(f, "Unknown"),
RegistryValue::RegNone => write!(f, "None"),
RegistryValue::RegSZ(val) => write!(f, "\"{}\"", val),
RegistryValue::RegExpandSZ(val) => write!(f, "\"{}\"", val),
RegistryValue::RegSZ(val) => write!(f, "{val:?}"),
RegistryValue::RegExpandSZ(val) => write!(f, "{val:?}"),
RegistryValue::RegBinary(val) => {
write!(f, "{:?}", if val.len() > 16 { &val[..16] } else { val })
}
RegistryValue::RegDWord(val) => write!(f, "0x{:08x}", val),
RegistryValue::RegDWordBigEndian(val) => write!(f, "0x{:08x}", val),
RegistryValue::RegLink(val) => write!(f, "\"{}\"", val),
RegistryValue::RegLink(val) => write!(f, "{val:?}"),
RegistryValue::RegMultiSZ(val) => write!(f, "{:?}", val),
RegistryValue::RegResourceList(val) => write!(f, "\"{}\"", val),
RegistryValue::RegFullResourceDescriptor(val) => write!(f, "\"{}\"", val),
RegistryValue::RegResourceRequirementsList(val) => write!(f, "\"{}\"", val),
RegistryValue::RegResourceList(val) => write!(f, "{val:?}"),
RegistryValue::RegFullResourceDescriptor(val) => write!(f, "{val:?}"),
RegistryValue::RegResourceRequirementsList(val) => write!(f, "{val:?}"),
RegistryValue::RegQWord(val) => write!(f, "0x{:016x}", val),
RegistryValue::RegFileTime => todo!(),
}
Expand Down

0 comments on commit c0cb138

Please sign in to comment.