From 3fd52147f39a52c981fae13317f18f61f808805b Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 10 Jul 2018 23:49:55 +0300 Subject: [PATCH] protocol: mark IncompleteMessageType as Copy warning: this argument is passed by value, but not consumed in the function body --> src/protocol/message.rs:98:30 | 98 | pub fn new(message_type: IncompleteMessageType) -> Self { | ^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(needless_pass_by_value)] on by default help: consider marking this type as Copy --> src/protocol/message.rs:135:1 | 135| / pub enum IncompleteMessageType { 136| | Text, 137| | Binary, 138| | } | |_^ = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#needless_pass_by_value --- src/protocol/message.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocol/message.rs b/src/protocol/message.rs index 8ee3eac..f7a4640 100644 --- a/src/protocol/message.rs +++ b/src/protocol/message.rs @@ -159,6 +159,7 @@ impl IncompleteMessage { } /// The type of incomplete message. +#[derive(Copy, Clone)] pub enum IncompleteMessageType { Text, Binary,