Skip to content

Commit

Permalink
editor: use Package::to_bytes in export window
Browse files Browse the repository at this point in the history
  • Loading branch information
barsoosayque committed Sep 28, 2024
1 parent c30f7e3 commit 24d9353
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/opensi-editor/src/file_dialogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ async fn import_package() -> LoadingPackageResult {
}

/// Show a dialog for saving existing [`Package`] asynchronously.
pub fn export_dialog(_package: &Package) {
// TODO: actuall data from package
let bytes = [0];
pub fn export_dialog(package: &Package) {
let Ok(bytes) = package.clone().to_bytes() else {
return;
};

let _handle = tokio::spawn(async move {
let file = rfd::AsyncFileDialog::new()
Expand Down

0 comments on commit 24d9353

Please sign in to comment.