owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
181 stars 35 forks source link

Compatibility with `serde_path_to_error` #117

Open AndrewKvalheim opened 4 weeks ago

AndrewKvalheim commented 4 weeks ago

I’d like to use serde_path_to_error but don’t see how to acquire the prerequisite fastnbt::de::Deserializer:

error: type `fastnbt::input::Slice<'_>` is private
|
|  let mut deserializer = fastnbt::de::Deserializer::from_bytes(&bytes, fastnbt::DeOpts::default());
|                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type

Should fastnbt::de::Deserializer::from_bytes be usable?

owengage commented 4 weeks ago

Hi, yes it looks like the slice type should be public. I'll look into this soon.