1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-11-17 01:10:19 +01:00

Commits vergleichen

..

Keine gemeinsamen Commits. "25c4e97f714e083dc591778de4c350bca942763b" und "ef1f8ed38f6cdfb428eac7b9c5348ac02b40234d" haben vollständig unterschiedliche Historien.

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;
use schemsearch_files::SchematicVersioned; #[allow(unused_imports)]
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 mut schemdata = block_on(load_schemdata(self.node.id)); let schemdata = block_on(load_schemdata(self.node.id));
SchematicVersioned::load_data(&mut Cursor::new(schemdata.as_mut_slice())) SchematicVersioned::load_data(schemdata.as_slice())
} }
pub fn get_name(&self) -> String { pub fn get_name(&self) -> String {