Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67a97043 authored by Charisee's avatar Charisee Committed by Charisee Chiw
Browse files

Change request for Rust v1.70.0

error: redundant clone
  --> packages/modules/Bluetooth/system/gd/rust/gddi/macros/lib.rs:19:35
   |
19 |     let ident = function.sig.ident.clone();
   |                                   ^^^^^^^^ help: remove this
   |
note: cloned value is neither consumed nor mutated
  --> packages/modules/Bluetooth/system/gd/rust/gddi/macros/lib.rs:19:17
   |
19 |     let ident = function.sig.ident.clone();
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
   = note: `-D clippy::redundant-clone` implied by `-D warnings

Test:./toolchain/android_rust/test_compiler.py --prebuilt-path dist/rust-dev.tar.gz --target aosp_cf_x86_64_phone
Bug: 285036397
Change-Id: Id327eccc147ee852426b3c93e91bfa21eb02d423
parent ddcb25ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
///! Waking timers for Bluetooth. Implemented using timerfd, but supposed to feel similar to
//! Waking timers for Bluetooth. Implemented using timerfd, but supposed to feel similar to
///Tokio's time
use nix::sys::time::TimeSpec;
use nix::sys::timerfd::{ClockId, Expiration, TimerFd, TimerFlags, TimerSetTimeFlags};
+3 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ use syn::{

/// Defines a provider function, with generated helper that implicitly fetches argument instances from the registry
#[proc_macro_attribute]
#[allow(clippy::redundant_clone)]
pub fn provides(_attr: TokenStream, item: TokenStream) -> TokenStream {
    let function: ItemFn = parse(item).expect("can only be applied to functions");

@@ -132,6 +133,7 @@ impl Parse for ModuleEntry {

/// Emits a module function that registers submodules & providers with the registry
#[proc_macro]
#[allow(clippy::redundant_clone)]
pub fn module(item: TokenStream) -> TokenStream {
    let module = parse_macro_input!(item as ModuleDef);
    let init_ident = module.name.clone();
@@ -177,6 +179,7 @@ pub fn derive_nop_stop(item: TokenStream) -> TokenStream {

/// Generates the code necessary to split up a type into its components
#[proc_macro_attribute]
#[allow(clippy::redundant_clone)]
pub fn part_out(_attr: TokenStream, item: TokenStream) -> TokenStream {
    let struct_: ItemStruct = parse(item).expect("can only be applied to struct definitions");
    let struct_ident = struct_.ident.clone();