Mirror von
https://github.com/Chaoscaot/schemsearch
synchronisiert 2024-11-16 17:00:14 +01:00
Commits vergleichen
2 Commits
ef1f8ed38f
...
25c4e97f71
Autor | SHA1 | Datum | |
---|---|---|---|
|
25c4e97f71 | ||
|
7d9e7f28a9 |
@ -15,11 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<SchematicVersioned, String> {
|
||||
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 {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren