1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-09-29 03:01:10 +02:00

Commits vergleichen

..

2 Commits

Autor SHA1 Nachricht Datum
Chaoscaot
25c4e97f71 Merge branch 'chaoscaot/support_sponge_v1_v3' 2023-04-23 12:19:22 +02:00
Chaoscaot
7d9e7f28a9 Fix SQL 2023-04-23 12:17:59 +02:00

Datei anzeigen

@ -15,11 +15,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
use std::io::Cursor;
use std::path::PathBuf; use std::path::PathBuf;
#[cfg(feature = "sql")] #[cfg(feature = "sql")]
use futures::executor::block_on; use futures::executor::block_on;
#[allow(unused_imports)] use schemsearch_files::SchematicVersioned;
use schemsearch_files::SpongeV2Schematic;
#[cfg(feature = "sql")] #[cfg(feature = "sql")]
use schemsearch_sql::{load_schemdata, SchematicNode}; use schemsearch_sql::{load_schemdata, SchematicNode};
@ -47,8 +47,8 @@ pub struct SqlSchematicSupplier {
#[cfg(feature = "sql")] #[cfg(feature = "sql")]
impl SqlSchematicSupplier { impl SqlSchematicSupplier {
pub fn get_schematic(&self) -> Result<SchematicVersioned, String> { pub fn get_schematic(&self) -> Result<SchematicVersioned, String> {
let schemdata = block_on(load_schemdata(self.node.id)); let mut schemdata = block_on(load_schemdata(self.node.id));
SchematicVersioned::load_data(schemdata.as_slice()) SchematicVersioned::load_data(&mut Cursor::new(schemdata.as_mut_slice()))
} }
pub fn get_name(&self) -> String { pub fn get_name(&self) -> String {