forked from AbleOS/ableos_userland
Removing bincode from xml
This commit is contained in:
parent
08fb866805
commit
89bbf03bd1
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -75,15 +75,6 @@ version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
|
checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bincode"
|
|
||||||
version = "1.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.3.2"
|
version = "1.3.2"
|
||||||
|
@ -507,7 +498,6 @@ dependencies = [
|
||||||
name = "xml"
|
name = "xml"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,4 @@ serde = { version = "1.0", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
"alloc",
|
"alloc",
|
||||||
] }
|
] }
|
||||||
bincode = { version = "1.3.3", default-features = false, features = ["alloc"] }
|
# bincode = { version = "1.3.3", default-features = false, features = ["alloc"] }
|
||||||
|
|
|
@ -33,12 +33,12 @@ pub struct XMLElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl XMLElement {
|
impl XMLElement {
|
||||||
pub fn to_bin(&self) -> Result<Vec<u8>, XMLError> {
|
// pub fn to_bin(&self) -> Result<Vec<u8>, XMLError> {
|
||||||
match bincode::serialize(&self) {
|
// // match bincode::serialize(&self) {
|
||||||
Ok(bin) => return Ok(bin),
|
// // Ok(bin) => return Ok(bin),
|
||||||
Err(err) => return Err(XMLError::EncodingError(err)),
|
// // Err(err) => return Err(XMLError::EncodingError(err)),
|
||||||
}
|
// // }
|
||||||
}
|
// }
|
||||||
pub fn from_bin(bin: Vec<u8>) -> Self {
|
pub fn from_bin(bin: Vec<u8>) -> Self {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,6 @@ pub fn string_to_num<T: Debug + Display>(string: T) -> Result<Types, XMLError> {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum XMLError {
|
pub enum XMLError {
|
||||||
TypeNotANumber,
|
TypeNotANumber,
|
||||||
EncodingError(bincode::Error),
|
// EncodingError(bincode::Error),
|
||||||
DecodingError(bincode::Error),
|
// DecodingError(bincode::Error),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue