diff --git a/Cargo.toml b/Cargo.toml index 2ca3c2c..a70e8ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,20 +21,20 @@ default = ["slint-backend-qt", "slint-backend-gl-all"] [dependencies] anyhow = "1.0.53" -cargo_metadata = "0.15" -crates-index = { version = "0.19.0" } +cargo_metadata = "0.18" +crates-index = { version = "2", features = ["git"] } dunce = "1.0.2" futures = "0.3" -itertools = "0.10" -open = "4.0" -rfd = { version = "0.11", default-features = false, features = [ "xdg-portal" ] } +itertools = "0.12" +open = "5" +rfd = { version = "0.12", default-features = false, features = [ "xdg-portal" ] } serde = "1.0.136" serde_json = "1.0.78" shlex = "1.1" -slint = { version = "1.1", default-features = false, features = [ "compat-1-0" ] } +slint = { version = "1.3", default-features = false, features = [ "compat-1-0" ] } tokio = { version = "1.24.2", features= ["full"] } -toml_edit = "0.19.0" -git2 = "0.16.1" +toml_edit = "0.21" +git2 = "0.18" [build-dependencies] slint-build = { version = "1.1" } diff --git a/src/cargo.rs b/src/cargo.rs index c882534..6bd134d 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -91,7 +91,7 @@ async fn cargo_worker_loop( ) -> tokio::io::Result<()> { let mut manifest: Manifest = default_manifest().into(); let mut metadata: Option = None; - let mut crates_index: Option = None; + let mut crates_index: Option = None; let mut package = SharedString::default(); let mut update_features = true; let mut install_queue = VecDeque::new(); @@ -318,9 +318,9 @@ async fn cargo_worker_loop( } } -async fn load_crate_index() -> Result { +async fn load_crate_index() -> Result { tokio::task::spawn_blocking(|| { - let mut index = crates_index::Index::new_cargo_default().map_err(|x| x.to_string())?; + let mut index = crates_index::GitIndex::new_cargo_default().map_err(|x| x.to_string())?; index.update().map_err(|x| x.to_string())?; Ok(index) }) @@ -555,7 +555,7 @@ async fn read_metadata(manifest: Manifest, handle: slint::Weak) -> Opti fn apply_metadata( metadata: &Metadata, - crates_index: Option<&crates_index::Index>, + crates_index: Option<&crates_index::GitIndex>, mut update_features: bool, package: &mut SharedString, handle: slint::Weak, @@ -712,7 +712,7 @@ fn build_dep_tree( depgraph_tree: &mut Vec, duplicates: &mut HashSet, metadata: &Metadata, - crates_index: Option<&crates_index::Index>, + crates_index: Option<&crates_index::GitIndex>, map: &HashMap, indentation: i32, ) { diff --git a/src/install.rs b/src/install.rs index 9888a6a..6f9abea 100644 --- a/src/install.rs +++ b/src/install.rs @@ -141,7 +141,7 @@ pub async fn process_install(job: InstallJob, handle: slint::Weak) -> s pub fn apply_install_list( mut list: Vec, - crates_index: Option<&crates_index::Index>, + crates_index: Option<&crates_index::GitIndex>, install_queue: &VecDeque, currently_installing: &SharedString, handle: slint::Weak,