Fix compression bug
This commit is contained in:
1 parent
1d24fe2631
commit
dddac01bdf
4 files changed
+61
-76
No files matched your search
@@ -38,8 +38,7 @@ fn compress(data: Vec<u8>) -> Result<Vec<u8>, NotificationData> {
|
||||
let mut encoder =
|
||||
Encoder::new(Vec::new(), DEFAULT_COMPRESSION_LEVEL).map_err(|_| CompressError)?;
|
||||
io::copy(&mut &data[..], &mut encoder).map_err(|_| PermissionDenied)?;
|
||||
encoder.finish().map_err(|_| CompressError)?;
|
||||
Ok(data)
|
||||
encoder.finish().map_err(|_| CompressError)
|
||||
}
|
||||
|
||||
pub async fn load_data(id: String, temp: bool) -> MaybeError {
|
||||
|
||||
Reference in new issue
Block a user