Skip to content

Commit

Permalink
Merge pull request #2458 from Integral-Tech/lower-rust-version
Browse files Browse the repository at this point in the history
chore: downgrade rust version in frb_codegen
  • Loading branch information
fzyzcjy authored Dec 17, 2024
2 parents 20d30c1 + 9fd7e6b commit c16902c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frb_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
categories.workspace = true
description.workspace = true
edition.workspace = true
rust-version = "1.83.0"
rust-version = "1.74.0"
keywords.workspace = true
license.workspace = true
name = "flutter_rust_bridge_codegen"
Expand Down
4 changes: 3 additions & 1 deletion frb_codegen/src/library/commands/cbindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ pub(crate) fn cbindgen_raw(
let parsed_crate_dir = parse_crate_dir(rust_crate_dir)?;
debug!("cbindgen parsed_crate_dir={}", parsed_crate_dir);

let bindings = cbindgen::generate_with_config(parsed_crate_dir, config).inspect_err(|e| {
#[allow(clippy::manual_inspect)]
let bindings = cbindgen::generate_with_config(parsed_crate_dir, config).map_err(|e| {
// This will stop the whole generator and tell the users, so we do not care about testing it
// frb-coverage:ignore-start
if let Error::ParseSyntaxError { src_path, .. } = &e {
let content =
fs::read_to_string(src_path).unwrap_or_else(|_| "CANNOT READ FILE".into());
info!("More information: src_path={src_path:?} content={content}");
}
e
// frb-coverage:ignore-end
})?;

Expand Down

0 comments on commit c16902c

Please sign in to comment.