style: apply cargo fmt after c_abi_harness additions

This commit is contained in:
Lahfir 2026-04-16 04:36:27 -07:00
parent 413cf903e7
commit 4b5c3fbf20
3 changed files with 14 additions and 8 deletions

View file

@ -52,10 +52,7 @@ pub unsafe extern "C" fn ad_app_list_count(list: *const AdAppList) -> u32 {
/// # Safety
/// `list` must be null or a pointer returned by `ad_list_apps`.
#[no_mangle]
pub unsafe extern "C" fn ad_app_list_get(
list: *const AdAppList,
index: u32,
) -> *const AdAppInfo {
pub unsafe extern "C" fn ad_app_list_get(list: *const AdAppList, index: u32) -> *const AdAppInfo {
if list.is_null() {
return ptr::null();
}

View file

@ -108,7 +108,10 @@ pub unsafe extern "C" fn ad_is(
}
fn is_known_property(p: &str) -> bool {
matches!(p, "focused" | "enabled" | "selected" | "checked" | "expanded")
matches!(
p,
"focused" | "enabled" | "selected" | "checked" | "expanded"
)
}
fn element_has_state(node: &AccessibilityNode, prop: &str) -> bool {

View file

@ -141,7 +141,9 @@ fn enum_fuzz_invalid_discriminant_rejected() {
action.drag = default_drag();
action.text = std::ptr::null();
let handle = AdNativeHandle { ptr: std::ptr::null() };
let handle = AdNativeHandle {
ptr: std::ptr::null(),
};
let mut out: AdActionResult = std::mem::zeroed();
let rc = ad_execute_action(adapter, &handle, &action, &mut out);
// Either the enum validator rejects (expected) or the cargo-test
@ -227,7 +229,9 @@ fn find_returns_not_found_on_empty_query_against_no_window() {
name_substring: std::ptr::null(),
value_substring: std::ptr::null(),
};
let mut handle = AdNativeHandle { ptr: std::ptr::null() };
let mut handle = AdNativeHandle {
ptr: std::ptr::null(),
};
let rc = ad_find(adapter, &bad_win, &query, &mut handle);
// A zeroed window has null id/title → InvalidArgs. On cargo-test
// worker threads the main-thread assert trips first and returns
@ -244,7 +248,9 @@ fn find_returns_not_found_on_empty_query_against_no_window() {
#[test]
fn free_handle_null_is_noop() {
with_adapter(|adapter| unsafe {
let handle = AdNativeHandle { ptr: std::ptr::null() };
let handle = AdNativeHandle {
ptr: std::ptr::null(),
};
let rc = ad_free_handle(adapter, &handle);
assert_eq!(rc, AdResult::Ok);