From 7d9e7f28a91818484d7635be181c501da6972962 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 23 Apr 2023 12:17:59 +0200 Subject: [PATCH] Fix SQL --- schemsearch-cli/src/types.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemsearch-cli/src/types.rs b/schemsearch-cli/src/types.rs index a6a1d37..e0b6129 100644 --- a/schemsearch-cli/src/types.rs +++ b/schemsearch-cli/src/types.rs @@ -15,11 +15,11 @@ * along with this program. If not, see . */ +use std::io::Cursor; use std::path::PathBuf; #[cfg(feature = "sql")] use futures::executor::block_on; -#[allow(unused_imports)] -use schemsearch_files::SpongeV2Schematic; +use schemsearch_files::SchematicVersioned; #[cfg(feature = "sql")] use schemsearch_sql::{load_schemdata, SchematicNode}; @@ -47,8 +47,8 @@ pub struct SqlSchematicSupplier { #[cfg(feature = "sql")] impl SqlSchematicSupplier { pub fn get_schematic(&self) -> Result { - let schemdata = block_on(load_schemdata(self.node.id)); - SchematicVersioned::load_data(schemdata.as_slice()) + let mut schemdata = block_on(load_schemdata(self.node.id)); + SchematicVersioned::load_data(&mut Cursor::new(schemdata.as_mut_slice())) } pub fn get_name(&self) -> String {