diff --git a/example/rust_test/service/src/lib.rs b/example/rust_test/service/src/lib.rs index 548a6772b4caeb19530e8ef63e92d97d7464184d..ad49d246ebc1c2d731d5b95a693861752ffec6ed 100644 --- a/example/rust_test/service/src/lib.rs +++ b/example/rust_test/service/src/lib.rs @@ -83,7 +83,7 @@ impl TryFrom for ICalcCode { } } -/// Function between proxy and stub of ICalcService +/// Function between proxy and stub of ICalcService pub trait ICalc: IRemoteBroker { /// Calc add num1 + num2 fn add(&self, num1: i32, num2: i32) -> IpcResult; diff --git a/interfaces/innerkits/rust/src/ashmem.rs b/interfaces/innerkits/rust/src/ashmem.rs index bacefa099496a8b95800971203dc2ad9fa28cd5a..2a270e600064063776d5d4d56462fd4af9a42145 100644 --- a/interfaces/innerkits/rust/src/ashmem.rs +++ b/interfaces/innerkits/rust/src/ashmem.rs @@ -161,7 +161,7 @@ impl Ashmem { // SAFETY: Rust Ashmem always hold a valid native CAshmem. ipc_binding::ReadFromCAshmem(self.as_inner(), size, offset) }; - if raw_ptr.is_null() { + if raw_ptr.is_null() { Err(IpcStatusCode::Failed) } else { Ok(RawData::new(raw_ptr, size as u32)) diff --git a/interfaces/innerkits/rust/src/ipc/remote_obj/death_recipient.rs b/interfaces/innerkits/rust/src/ipc/remote_obj/death_recipient.rs index afbb307890fecaeb07e2c2fa6ff8073a394e8d8b..0febc8c96772dfca1f8e72a97b16bee783e85c51 100644 --- a/interfaces/innerkits/rust/src/ipc/remote_obj/death_recipient.rs +++ b/interfaces/innerkits/rust/src/ipc/remote_obj/death_recipient.rs @@ -23,7 +23,7 @@ const LOG_LABEL: HiLogLabel = HiLogLabel { tag: "RustDeathRecipient" }; -/// This type represent a rust DeathRecipient which like C++ DethRecipient. +/// This type represent a rust DeathRecipient which like C++ DethRecipient. #[repr(C)] pub struct DeathRecipient { native: *mut CDeathRecipient, diff --git a/interfaces/innerkits/rust/src/ipc/remote_stub.rs b/interfaces/innerkits/rust/src/ipc/remote_stub.rs index 96a1587a1146ba089d28efa22c08c02bf05f12c6..760eef160de156d635604224fc6cbeb9cc51c345 100644 --- a/interfaces/innerkits/rust/src/ipc/remote_stub.rs +++ b/interfaces/innerkits/rust/src/ipc/remote_stub.rs @@ -13,7 +13,7 @@ * limitations under the License. */ -use crate::{ipc_binding, IRemoteStub, IRemoteBroker, RemoteObj, BorrowedMsgParcel, }; +use crate::{ipc_binding, IRemoteStub, IRemoteBroker, RemoteObj, BorrowedMsgParcel}; use crate::ipc_binding::{CRemoteObject, CParcel}; use std::ffi::{c_void, CString, c_char}; use std::ops::{Deref}; diff --git a/interfaces/innerkits/rust/src/process.rs b/interfaces/innerkits/rust/src/process.rs index 228c06e4570a3c9256ce2ba5f4ede5adc2124d33..501392d2d370554a63b1f6ad503e71e53b5abaeb 100644 --- a/interfaces/innerkits/rust/src/process.rs +++ b/interfaces/innerkits/rust/src/process.rs @@ -17,7 +17,7 @@ use crate::{ ipc_binding, MsgParcel, RemoteObj, IRemoteObj, InterfaceToken, String16, IpcResult, IpcStatusCode, parse_status_code, }; -use crate::parcel::{vec_to_string, allocate_vec_with_buffer,}; +use crate::parcel::{vec_to_string, allocate_vec_with_buffer}; use std::ffi::{CString, c_char, c_void}; use hilog_rust::{info, hilog, HiLogLabel, LogType}; @@ -164,7 +164,7 @@ pub fn set_calling_identity(identity: String) -> bool /// get local device id #[inline] -pub fn get_local_device_id() -> IpcResult +pub fn get_local_device_id() -> IpcResult { let mut vec: Option> = None; let ok_status = unsafe { @@ -204,7 +204,7 @@ pub fn get_calling_device_id() -> IpcResult /// reset calling identity #[inline] -pub fn reset_calling_identity() -> IpcResult +pub fn reset_calling_identity() -> IpcResult { let mut vec: Option> = None; let ok_status = unsafe { diff --git a/ipc/native/test/unittest/rust/service/src/lib.rs b/ipc/native/test/unittest/rust/service/src/lib.rs index 6ca607d96afa3897c63342d36dddf1ad53531ccc..f1950bf6601870bf721fc5a8d95eb2f07df0a1ae 100644 --- a/ipc/native/test/unittest/rust/service/src/lib.rs +++ b/ipc/native/test/unittest/rust/service/src/lib.rs @@ -84,7 +84,7 @@ impl TryFrom for ITestCode { } } -/// Function between proxy and stub of ITestService +/// Function between proxy and stub of ITestService pub trait ITest: IRemoteBroker { /// Test sync transaction fn test_sync_transaction(&self, value: i32, delay_time: i32) -> IpcResult;