From 6264254065bbae9d89f51cf3330379b7ace09592 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 3 May 2025 23:15:17 -0400 Subject: [Rust] Return `String` instead of `BnString` for cases where lossy conversion can be tolerated Still need to go and audit all usage, but realistically the most important places to give the user control are with symbols, where the data can come from non utf8 sources This is still incomplete, I just looked for usage of -> BnString so any other variant was omitted. --- plugins/warp/src/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/warp/src/cache.rs') diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs index 7219b547..8c82c687 100644 --- a/plugins/warp/src/cache.rs +++ b/plugins/warp/src/cache.rs @@ -439,7 +439,7 @@ pub struct TypeRefID(u64); impl From<&BNNamedTypeReference> for TypeRefID { fn from(value: &BNNamedTypeReference) -> Self { let mut hasher = DefaultHasher::new(); - hasher.write(value.id().as_bytes()); + hasher.write(value.id().to_bytes()); Self(hasher.finish()) } } -- cgit v1.3.1