summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2023-01-21 00:42:48 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-01-21 00:42:48 +0000
commitd30f8081952cc0f4a4827a397011ff6148fb77a7 (patch)
tree673164cb157778be658490cb298b6c219ec552a7
parenteec41c20fccde72e81a00bf6577633a4e6200b4c (diff)
parent6fe5d64b03b51fccea87ba462348943a33a3a5de (diff)
downloadnative-main-16k-with-phones.tar.gz
Merge "Import macro directly rather than using #[macro_use]."main-16k-with-phones
-rw-r--r--libs/binder/rust/src/lib.rs4
-rw-r--r--libs/binder/rust/tests/parcel_fuzzer/parcel_fuzzer.rs5
-rw-r--r--libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/service_fuzzer.rs4
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;