update Rust

This commit is contained in:
2024-02-07 20:38:16 +08:00
parent 5fa62351f2
commit 95b4b8b947
7 changed files with 29 additions and 53 deletions

View File

@ -2,8 +2,8 @@ use std::sync::Arc;
use crate::downloader::{do_cancel_download, do_start_download, DownloadCallbackData};
use crate::frb_generated::StreamSink;
pub fn start_download(url: String, save_path: String, file_name: String, connection_count: u8, sink: StreamSink<DownloadCallbackData>) {
let _ = do_start_download(url, save_path, file_name, connection_count, Arc::new(sink));
pub async fn start_download(url: String, save_path: String, file_name: String, connection_count: u8, sink: StreamSink<DownloadCallbackData>) {
do_start_download(url, save_path, file_name, connection_count, Arc::new(sink)).await.unwrap();
}
pub async fn cancel_download(id: String) {