Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
# Rust standard library module name
consts = "consts"
5 changes: 3 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ fn generate_bindings(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<S
// Add macOS SDK path for system headers (stdlib.h, etc.)
// Required for libclang 19+ with preserve_none calling convention support
#[cfg(target_os = "macos")]
if let Ok(sdk_path) = std::process::Command::new("xcrun")
if let Some(sdk_path) = std::process::Command::new("xcrun")
.args(["--show-sdk-path"])
.output()
&& sdk_path.status.success()
.ok()
.filter(|output| output.status.success())
{
let path = String::from_utf8_lossy(&sdk_path.stdout);
let path = path.trim();
Expand Down
9 changes: 5 additions & 4 deletions crates/macros/src/impl_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ fn generate_method_builder(
})
.collect();

// Find the optional boundary: the first index where all remaining args are Option<T>.
// Args before this boundary are required (even if Option<T>), args at/after are optional.
// This handles cases like `fn foo(opt: Option<i64>, required: i64)` correctly -
// `opt` is effectively required because a required param follows it.
// Find the optional boundary: the first index where all remaining args are
// Option<T>. Args before this boundary are required (even if Option<T>),
// args at/after are optional. This handles cases like `fn foo(opt:
// Option<i64>, required: i64)` correctly - `opt` is effectively required
// because a required param follows it.
let optional_boundary = {
let mut boundary = args.len();
for i in (0..args.len()).rev() {
Expand Down
Loading