agent: clear module_inception/type_complexity warnings

To clear these two warnings, this commit did changes:

- add `#![allow(clippy::module_inception)]` to target files
- use type alias for tuple of `(MessageHeader, Vec<u8>)`

Signed-off-by: bin liu <bin@hyper.sh>
Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
bin liu 2020-10-16 18:54:35 +08:00 committed by Chelsea Mafrica
parent 91e12404f3
commit 974e0e3b31
2 changed files with 5 additions and 5 deletions

View File

@ -1735,13 +1735,12 @@ mod tests {
use std::sync::mpsc::{Receiver, Sender}; use std::sync::mpsc::{Receiver, Sender};
use ttrpc::{MessageHeader, TtrpcContext}; use ttrpc::{MessageHeader, TtrpcContext};
fn mk_ttrpc_context() -> (TtrpcContext, Receiver<(MessageHeader, Vec<u8>)>) { type Message = (MessageHeader, Vec<u8>);
fn mk_ttrpc_context() -> (TtrpcContext, Receiver<Message>) {
let mh = MessageHeader::default(); let mh = MessageHeader::default();
let (tx, rx): ( let (tx, rx): (Sender<Message>, Receiver<Message>) = channel();
Sender<(MessageHeader, Vec<u8>)>,
Receiver<(MessageHeader, Vec<u8>)>,
) = channel();
let ctx = TtrpcContext { let ctx = TtrpcContext {
fd: -1, fd: -1,

View File

@ -2,6 +2,7 @@
// //
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// //
#![allow(clippy::module_inception)]
#[cfg(test)] #[cfg(test)]
mod test_utils { mod test_utils {