File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ use alloc::boxed::Box;
3
3
#[ cfg( not( feature = "std" ) ) ]
4
4
use alloc:: vec:: Vec ;
5
5
6
- use core:: fmt:: Debug ;
7
-
8
6
use bytes:: { Buf , BufMut } ;
9
7
10
8
use crate :: encoding:: varint:: { encode_varint, encoded_len_varint} ;
@@ -14,7 +12,7 @@ use crate::DecodeError;
14
12
use crate :: EncodeError ;
15
13
16
14
/// A Protocol Buffers message.
17
- pub trait Message : Debug + Send + Sync {
15
+ pub trait Message : Send + Sync {
18
16
/// Encodes the message to a buffer.
19
17
///
20
18
/// This method will panic if the buffer has insufficient capacity.
Original file line number Diff line number Diff line change 1
- pub trait CustomType : prost:: Message + Default { }
1
+ pub trait CustomType : prost:: Message + Default + core :: fmt :: Debug { }
2
2
3
3
impl CustomType for u64 { }
4
4
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ pub mod proto3 {
118
118
}
119
119
}
120
120
121
+ use core:: fmt:: Debug ;
122
+
121
123
#[ cfg( not( feature = "std" ) ) ]
122
124
use alloc:: vec:: Vec ;
123
125
@@ -224,7 +226,7 @@ where
224
226
/// Generic roundtrip serialization check for messages.
225
227
pub fn check_message < M > ( msg : & M )
226
228
where
227
- M : Message + Default + PartialEq ,
229
+ M : Debug + Message + Default + PartialEq ,
228
230
{
229
231
let expected_len = msg. encoded_len ( ) ;
230
232
You can’t perform that action at this time.
0 commit comments