Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toml dependency to latest version #2044

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ commands:
# Our minimum supported rust version is specified here.
prepare-rust-min-version:
steps:
- run: rustup override set 1.66.0
- run: rustup override set 1.70.0
- run: rustup update
build-api-docs:
steps:
Expand Down
69 changes: 67 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion uniffi_bindgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ heck = "0.4"
once_cell = "1.12"
paste = "1.0"
serde = { version = "1", features = ["derive"] }
toml = "0.5"
toml = "0.8"
uniffi_meta = { path = "../uniffi_meta", version = "=0.26.1" }
uniffi_testing = { path = "../uniffi_testing", version = "=0.26.1" }
uniffi_udl = { path = "../uniffi_udl", version = "=0.26.1" }
Expand Down
5 changes: 3 additions & 2 deletions uniffi_bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ fn crate_name_from_cargo_toml(udl_file: &Utf8Path) -> Result<String> {
let file = guess_crate_root(udl_file)?.join("Cargo.toml");
let cargo_toml_bytes =
fs::read(file).context("Can't find Cargo.toml to determine the crate name")?;

let cargo_toml = toml::from_slice::<CargoToml>(&cargo_toml_bytes)?;
let cargo_toml_string =
String::from_utf8(cargo_toml_bytes).context("Could not UTF-8 decode Cargo.toml")?;
let cargo_toml = toml::from_str::<CargoToml>(&cargo_toml_string)?;

let lib_crate_name = cargo_toml
.lib
Expand Down
2 changes: 1 addition & 1 deletion uniffi_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ proc-macro2 = "1.0"
quote = "1.0"
serde = { version = "1.0.136", features = ["derive"] }
syn = { version = "2.0", features = ["full", "visit-mut"] }
toml = "0.5.9"
toml = "0.8"
uniffi_build = { path = "../uniffi_build", version = "=0.26.1", optional = true }
uniffi_meta = { path = "../uniffi_meta", version = "=0.26.1" }

Expand Down
5 changes: 3 additions & 2 deletions uniffi_macros/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ pub fn mod_path() -> syn::Result<String> {
static LIB_CRATE_MOD_PATH: Lazy<Result<String, String>> = Lazy::new(|| {
let file = manifest_path()?;
let cargo_toml_bytes = fs::read(file).map_err(|e| e.to_string())?;

let cargo_toml = toml::from_slice::<CargoToml>(&cargo_toml_bytes)
let cargo_toml_string = String::from_utf8(cargo_toml_bytes)
.map_err(|e| format!("Could not UTF-8 decode `Cargo.toml`: {e}"))?;
let cargo_toml = toml::from_str::<CargoToml>(&cargo_toml_string)
.map_err(|e| format!("Failed to parse `Cargo.toml`: {e}"))?;

let lib_crate_name = cargo_toml
Expand Down