From 501faccc4fb08376220b312f6eadca07ba2a90f8 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 18 Jun 2024 15:12:46 +0200 Subject: [PATCH] Update dependencies --- Cargo.toml | 17 +++++++++-------- src/cargo.rs | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c0a77a2..a97e313 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,29 +12,30 @@ repository = "https://github.com/slint-ui/cargo-ui" resolver = "2" [features] +slint-backend-default = ["slint/backend-default", "slint/renderer-femtovg"] slint-backend-qt = ["slint/backend-qt"] slint-backend-gl-all = ["slint/backend-winit", "slint/renderer-winit-femtovg"] slint-backend-gl-wayland = ["slint/backend-winit-wayland", "slint/renderer-winit-femtovg"] slint-backend-gl-x11 = ["slint/backend-winit-x11", "slint/renderer-winit-femtovg"] -default = ["slint-backend-qt", "slint-backend-gl-all"] +default = ["slint-backend-default"] [dependencies] anyhow = "1.0.53" cargo_metadata = "0.18" -crates-index = { version = "2", features = ["git"] } +crates-index = { version = "3", default-features = false, features = [ "git", "git-https" ] } dunce = "1.0.2" futures = "0.3" -itertools = "0.12" -open = "5" -rfd = { version = "0.12", default-features = false, features = [ "xdg-portal" ] } +itertools = "0.13" +open = "5.1" +rfd = { version = "0.14", default-features = false, features = [ "xdg-portal", "tokio" ] } serde = "1.0.136" serde_json = "1.0.78" shlex = "1.1" -slint = { version = "1.3", default-features = false, features = [ "compat-1-0" ] } +slint = { version = "1.6", default-features = false, features = [ "compat-1-2" ] } tokio = { version = "1.24.2", features= ["full"] } -toml_edit = "0.21" -git2 = "0.18" +toml_edit = "0.22.0" +git2 = "0.19" [build-dependencies] slint-build = { version = "1.3" } diff --git a/src/cargo.rs b/src/cargo.rs index 6bd134d..ab51194 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -923,7 +923,7 @@ fn to_table_name(dep_kind: DependencyKind) -> &'static str { fn dependency_remove(pkg: &Path, dependency: &str, dep_kind: DependencyKind) -> anyhow::Result<()> { let manifest_contents = std::fs::read_to_string(pkg) .with_context(|| format!("Failed to load '{}'", pkg.display()))?; - let mut document: toml_edit::Document = manifest_contents.parse()?; + let mut document: toml_edit::DocumentMut = manifest_contents.parse()?; let table_name = to_table_name(dep_kind); let dependencies = &mut document[table_name]; let removed = !std::mem::take(&mut dependencies[dependency]).is_none(); @@ -942,7 +942,7 @@ fn dependency_upgrade_to_version( ) -> anyhow::Result<()> { let manifest_contents = std::fs::read_to_string(pkg) .with_context(|| format!("Failed to load '{}'", pkg.display()))?; - let mut document: toml_edit::Document = manifest_contents.parse()?; + let mut document: toml_edit::DocumentMut = manifest_contents.parse()?; let table_name = to_table_name(dep_kind); let dep = &mut document[table_name][dependency]; if dep.is_none() { @@ -967,7 +967,7 @@ fn dependency_add( ) -> anyhow::Result<()> { let manifest_contents = std::fs::read_to_string(pkg) .with_context(|| format!("Failed to load '{}'", pkg.display()))?; - let mut document: toml_edit::Document = manifest_contents.parse()?; + let mut document: toml_edit::DocumentMut = manifest_contents.parse()?; let table_name = to_table_name(dep_kind); let tbl = &mut document[table_name].or_insert(toml_edit::table()); if !tbl.is_table_like() {