Skip to content

Commit

Permalink
refactor(core): improve performance of the extract API (#3963)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Apr 25, 2022
1 parent edf85bc commit f7d3d93
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 186 deletions.
5 changes: 5 additions & 0 deletions .changes/archive-format-plain-breaking-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

**Breaking change:** Removed `tauri::api::file::ArchiveFormat::Plain`.
5 changes: 5 additions & 0 deletions .changes/extract-file-breaking.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

**Breaking change:** The `tauri::api::file::Extract#extract_file` function has been moved to `tauri::api::file::Entry#extract`.
5 changes: 5 additions & 0 deletions .changes/extract-files-breaking-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

**Breaking change:** The `tauri::api::file::Extract#files` function has been renamed to `with_files` for performance reasons.
5 changes: 5 additions & 0 deletions .changes/extract-performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Improved the performance of the `tauri::api::fs::Extract` API.
7 changes: 4 additions & 3 deletions core/tauri/src/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ pub enum Error {
/// Command error.
#[error("Command Error: {0}")]
Command(String),
/// The extract archive error.
#[error("Extract Error: {0}")]
Extract(String),
/// The path operation error.
#[error("Path Error: {0}")]
Path(String),
Expand Down Expand Up @@ -69,6 +66,10 @@ pub enum Error {
#[cfg(feature = "fs-extract-api")]
#[error(transparent)]
Zip(#[from] zip::result::ZipError),
/// Extract error.
#[cfg(feature = "fs-extract-api")]
#[error("Failed to extract: {0}")]
Extract(String),
/// Notification error.
#[cfg(notification_all)]
#[error(transparent)]
Expand Down

0 comments on commit f7d3d93

Please sign in to comment.