diff options
| author | mat <git@matdoes.dev> | 2023-07-20 06:49:47 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-07-20 06:49:47 -0500 |
| commit | 2ab16402de3ac12c04696833450cd8d2f7b39b85 (patch) | |
| tree | 63d55c7d99c82c80f2e95ad2d4da3d063dd7684a | |
| parent | 7959a1800176645ed0bc7aa0021615d7a03d3b1c (diff) | |
| download | azalea-drasl-2ab16402de3ac12c04696833450cd8d2f7b39b85.tar.xz | |
delete unused serde module
| -rw-r--r-- | azalea-nbt/src/serde/mod.rs | 1 | ||||
| -rw-r--r-- | azalea-nbt/src/serde/serializer.rs | 205 |
2 files changed, 0 insertions, 206 deletions
diff --git a/azalea-nbt/src/serde/mod.rs b/azalea-nbt/src/serde/mod.rs deleted file mode 100644 index 21d53a0f..00000000 --- a/azalea-nbt/src/serde/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod serializer; diff --git a/azalea-nbt/src/serde/serializer.rs b/azalea-nbt/src/serde/serializer.rs deleted file mode 100644 index 945d2b42..00000000 --- a/azalea-nbt/src/serde/serializer.rs +++ /dev/null @@ -1,205 +0,0 @@ -use serde::{ser, Serialize}; - -use crate::Nbt; - -use std; -use std::fmt::{self, Display}; - -use serde::de; - -pub type Result<T> = std::result::Result<T, Error>; - -// This is a bare-bones implementation. A real library would provide additional -// information in its error type, for example the line and column at which the -// error occurred, the byte offset into the input, or the current key being -// processed. -#[derive(Debug)] -pub enum Error { - Message(String), -} - -impl Display for Error { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - match self { - Error::Message(msg) => formatter.write_str(msg), - } - } -} - -impl ser::Error for Error { - fn custom<T: Display>(msg: T) -> Self { - Error::Message(msg.to_string()) - } -} - -impl de::Error for Error { - fn custom<T: Display>(msg: T) -> Self { - Error::Message(msg.to_string()) - } -} - -impl std::error::Error for Error {} - -impl<'a> ser::Serializer for &'a mut Nbt { - type Ok = (); - - type Error = Error; - - type SerializeSeq = Self; - - type SerializeTuple = Self; - - type SerializeTupleStruct = Self; - - type SerializeTupleVariant = Self; - - type SerializeMap = Self; - - type SerializeStruct = Self; - - type SerializeStructVariant = Self; - - fn serialize_bool(self, v: bool) -> Result<()> { - todo!() - } - - fn serialize_i8(self, v: i8) -> Result<()> { - todo!() - } - - fn serialize_i16(self, v: i16) -> Result<()> { - todo!() - } - - fn serialize_i32(self, v: i32) -> Result<()> { - todo!() - } - - fn serialize_i64(self, v: i64) -> Result<()> { - todo!() - } - - fn serialize_u8(self, v: u8) -> Result<()> { - todo!() - } - - fn serialize_u16(self, v: u16) -> Result<()> { - todo!() - } - - fn serialize_u32(self, v: u32) -> Result<()> { - todo!() - } - - fn serialize_u64(self, v: u64) -> Result<()> { - todo!() - } - - fn serialize_f32(self, v: f32) -> Result<()> { - todo!() - } - - fn serialize_f64(self, v: f64) -> Result<()> { - todo!() - } - - fn serialize_char(self, v: char) -> Result<()> { - todo!() - } - - fn serialize_str(self, v: &str) -> Result<()> { - todo!() - } - - fn serialize_bytes(self, v: &[u8]) -> Result<()> { - todo!() - } - - fn serialize_none(self) -> Result<()> { - todo!() - } - - fn serialize_some<T: ?Sized>(self, value: &T) -> Result<()> - where - T: Serialize, - { - todo!() - } - - fn serialize_unit(self) -> Result<()> { - todo!() - } - - fn serialize_unit_struct(self, name: &'static str) -> Result<()> { - todo!() - } - - fn serialize_unit_variant( - self, - name: &'static str, - variant_index: u32, - variant: &'static str, - ) -> Result<()> { - todo!() - } - - fn serialize_newtype_struct<T: ?Sized>(self, name: &'static str, value: &T) -> Result<()> - where - T: Serialize, - { - todo!() - } - - fn serialize_newtype_variant<T: ?Sized>( - self, - name: &'static str, - variant_index: u32, - variant: &'static str, - value: &T, - ) -> Result<()> - where - T: Serialize, - { - todo!() - } - - fn serialize_seq(self, len: Option<usize>) -> Result<()> { - todo!() - } - - fn serialize_tuple(self, len: usize) -> Result<()> { - todo!() - } - - fn serialize_tuple_struct(self, name: &'static str, len: usize) -> Result<()> { - todo!() - } - - fn serialize_tuple_variant( - self, - name: &'static str, - variant_index: u32, - variant: &'static str, - len: usize, - ) -> Result<()> { - todo!() - } - - fn serialize_map(self, len: Option<usize>) -> Result<()> { - todo!() - } - - fn serialize_struct(self, name: &'static str, len: usize) -> Result<()> { - todo!() - } - - fn serialize_struct_variant( - self, - name: &'static str, - variant_index: u32, - variant: &'static str, - len: usize, - ) -> Result<()> { - todo!() - } -} |
