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>
This commit is contained in:
bin liu 2020-10-16 18:54:35 +08:00
parent 698d25b7ee
commit 227edfdc9f
2 changed files with 5 additions and 5 deletions

View File

@ -1663,13 +1663,12 @@ mod tests {
use std::sync::mpsc::{Receiver, Sender};
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 (tx, rx): (
Sender<(MessageHeader, Vec<u8>)>,
Receiver<(MessageHeader, Vec<u8>)>,
) = channel();
let (tx, rx): (Sender<Message>, Receiver<Message>) = channel();
let ctx = TtrpcContext {
fd: -1,

View File

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