Mirror von
https://github.com/Chaoscaot/schemsearch
synchronisiert 2024-11-19 10:20:08 +01:00
remove Serde
Dieser Commit ist enthalten in:
Ursprung
a47c2f44bd
Commit
9a0b0535c6
@ -8,6 +8,4 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
flate2 = "1.0.25"
|
flate2 = "1.0.25"
|
||||||
hematite-nbt = "0.5.2"
|
hematite-nbt = "0.5.2"
|
||||||
serde = "1.0.152"
|
|
||||||
serde_json = "1.0.84"
|
|
||||||
|
|
||||||
|
@ -7,6 +7,4 @@ license = "AGPL-3.0-or-later"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hematite-nbt = "0.5.2"
|
|
||||||
serde = "1.0.152"
|
|
||||||
schemsearch-files = { path = "../schemsearch-files" }
|
schemsearch-files = { path = "../schemsearch-files" }
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
pub mod pattern_mapper;
|
pub mod pattern_mapper;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use pattern_mapper::match_palette;
|
use pattern_mapper::match_palette;
|
||||||
use schemsearch_files::SchematicVersioned;
|
use schemsearch_files::SchematicVersioned;
|
||||||
use crate::pattern_mapper::match_palette_adapt;
|
use crate::pattern_mapper::match_palette_adapt;
|
||||||
@ -136,7 +135,7 @@ pub fn normalize_data(data: &str, ignore_data: bool) -> &str {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use serde::de::Unexpected::Map;
|
use schemsearch_files::SchematicVersioned::V2;
|
||||||
use schemsearch_files::SpongeV2Schematic;
|
use schemsearch_files::SpongeV2Schematic;
|
||||||
use crate::pattern_mapper::strip_data;
|
use crate::pattern_mapper::strip_data;
|
||||||
use super::*;
|
use super::*;
|
||||||
@ -245,26 +244,4 @@ mod tests {
|
|||||||
println!("{:?}", matches);
|
println!("{:?}", matches);
|
||||||
assert_eq!(matches.len(), 1);
|
assert_eq!(matches.len(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
pub fn testsezi() {
|
|
||||||
let schematic = SchematicVersioned::V2(SpongeV2Schematic {
|
|
||||||
data_version: 0,
|
|
||||||
metadata: nbt::Map::new(),
|
|
||||||
width: 16,
|
|
||||||
height: 16,
|
|
||||||
length: 16,
|
|
||||||
offset: [0; 3],
|
|
||||||
palette_max: 0,
|
|
||||||
palette: nbt::Map::new(),
|
|
||||||
block_data: vec![],
|
|
||||||
entities: Some(vec![]),
|
|
||||||
block_entities: vec![],
|
|
||||||
});
|
|
||||||
|
|
||||||
println!("{:?}", schematic);
|
|
||||||
println!("{}", serde_json::to_string_pretty(&schematic).unwrap());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren