diff options
| author | 2023-01-19 11:27:01 +0000 | |
|---|---|---|
| committer | 2023-01-19 14:58:11 +0000 | |
| commit | 6fe5d64b03b51fccea87ba462348943a33a3a5de (patch) | |
| tree | fff1ff33e5c2c268b9038dde7ac6fa4f9417d077 | |
| parent | 1c5aa9cb5d7969ca1610a5566a64e912b2fd8724 (diff) | |
Import macro directly rather than using #[macro_use].
`extern crate` makes it harder to keep track of dependencies, so we
prefer to import macros explicitly instead.
Bug: 261037227
Test: m example_service_fuzzer parcel_fuzzer_rs
Test: atest libbinder_rs-internal_test libbinder_ndk_bindgen_test
Change-Id: I6dbce8ee985d0a850ddddf8d08d5b330f5f13c9f
3 files changed, 4 insertions, 9 deletions
diff --git a/libs/binder/rust/src/lib.rs b/libs/binder/rust/src/lib.rs index a0e61d95f9..0c8b48f1f5 100644 --- a/libs/binder/rust/src/lib.rs +++ b/libs/binder/rust/src/lib.rs @@ -94,14 +94,12 @@ //! ``` #[macro_use] -mod proxy; - -#[macro_use] mod binder; mod binder_async; mod error; mod native; mod parcel; +mod proxy; mod state; use binder_ndk_sys as sys; diff --git a/libs/binder/rust/tests/parcel_fuzzer/parcel_fuzzer.rs b/libs/binder/rust/tests/parcel_fuzzer/parcel_fuzzer.rs index c5c7719df2..29bf92cb97 100644 --- a/libs/binder/rust/tests/parcel_fuzzer/parcel_fuzzer.rs +++ b/libs/binder/rust/tests/parcel_fuzzer/parcel_fuzzer.rs @@ -17,9 +17,6 @@ #![allow(missing_docs)] #![no_main] -#[macro_use] -extern crate libfuzzer_sys; - mod read_utils; use crate::read_utils::READ_FUNCS; @@ -31,7 +28,7 @@ use binder::{ StatusCode, }; use binder_random_parcel_rs::create_random_parcel; -use libfuzzer_sys::arbitrary::Arbitrary; +use libfuzzer_sys::{arbitrary::Arbitrary, fuzz_target}; #[derive(Arbitrary, Debug)] enum ReadOperation { diff --git a/libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/service_fuzzer.rs b/libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/service_fuzzer.rs index a427f28e29..c53038210c 100644 --- a/libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/service_fuzzer.rs +++ b/libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/service_fuzzer.rs @@ -16,8 +16,8 @@ #![allow(missing_docs)] #![no_main] -#[macro_use] -extern crate libfuzzer_sys; + +use libfuzzer_sys::fuzz_target; use binder::{self, BinderFeatures, Interface}; use binder_random_parcel_rs::fuzz_service; |