Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ogoffart committed Jun 18, 2024
1 parent ab14262 commit 501facc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
6 changes: 3 additions & 3 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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() {
Expand All @@ -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() {
Expand Down

0 comments on commit 501facc

Please sign in to comment.