mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +00:00
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:
parent
698d25b7ee
commit
227edfdc9f
@ -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,
|
||||
|
@ -2,6 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
#![allow(clippy::module_inception)]
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_utils {
|
||||
|
Loading…
Reference in New Issue
Block a user