@@ -17,10 +17,7 @@ use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSe
17
17
use std:: rc:: Rc ;
18
18
use std:: sync:: Arc ;
19
19
20
- impl <
21
- T : Encodable
22
- > Encodable for LinkedList < T > {
23
- #[ inline]
20
+ impl < T : Encodable > Encodable for LinkedList < T > {
24
21
fn encode < S : Encoder > ( & self , s : & mut S ) -> Result < ( ) , S :: Error > {
25
22
s. emit_seq ( self . len ( ) , |s| {
26
23
for ( i, e) in self . iter ( ) . enumerate ( ) {
32
29
}
33
30
34
31
impl < T : Decodable > Decodable for LinkedList < T > {
35
- #[ inline]
36
32
fn decode < D : Decoder > ( d : & mut D ) -> Result < LinkedList < T > , D :: Error > {
37
33
d. read_seq ( |d, len| {
38
34
let mut list = LinkedList :: new ( ) ;
@@ -45,7 +41,6 @@ impl<T:Decodable> Decodable for LinkedList<T> {
45
41
}
46
42
47
43
impl < T : Encodable > Encodable for VecDeque < T > {
48
- #[ inline]
49
44
fn encode < S : Encoder > ( & self , s : & mut S ) -> Result < ( ) , S :: Error > {
50
45
s. emit_seq ( self . len ( ) , |s| {
51
46
for ( i, e) in self . iter ( ) . enumerate ( ) {
@@ -57,7 +52,6 @@ impl<T: Encodable> Encodable for VecDeque<T> {
57
52
}
58
53
59
54
impl < T : Decodable > Decodable for VecDeque < T > {
60
- #[ inline]
61
55
fn decode < D : Decoder > ( d : & mut D ) -> Result < VecDeque < T > , D :: Error > {
62
56
d. read_seq ( |d, len| {
63
57
let mut deque: VecDeque < T > = VecDeque :: new ( ) ;
@@ -69,11 +63,10 @@ impl<T:Decodable> Decodable for VecDeque<T> {
69
63
}
70
64
}
71
65
72
- impl <
73
- K : Encodable + PartialEq + Ord ,
74
- V : Encodable
75
- > Encodable for BTreeMap < K , V > {
76
- #[ inline]
66
+ impl < K , V > Encodable for BTreeMap < K , V >
67
+ where K : Encodable + PartialEq + Ord ,
68
+ V : Encodable
69
+ {
77
70
fn encode < S : Encoder > ( & self , e : & mut S ) -> Result < ( ) , S :: Error > {
78
71
e. emit_map ( self . len ( ) , |e| {
79
72
let mut i = 0 ;
@@ -87,11 +80,10 @@ impl<
87
80
}
88
81
}
89
82
90
- impl <
91
- K : Decodable + PartialEq + Ord ,
92
- V : Decodable
93
- > Decodable for BTreeMap < K , V > {
94
- #[ inline]
83
+ impl < K , V > Decodable for BTreeMap < K , V >
84
+ where K : Decodable + PartialEq + Ord ,
85
+ V : Decodable
86
+ {
95
87
fn decode < D : Decoder > ( d : & mut D ) -> Result < BTreeMap < K , V > , D :: Error > {
96
88
d. read_map ( |d, len| {
97
89
let mut map = BTreeMap :: new ( ) ;
@@ -105,10 +97,9 @@ impl<
105
97
}
106
98
}
107
99
108
- impl <
109
- T : Encodable + PartialEq + Ord
110
- > Encodable for BTreeSet < T > {
111
- #[ inline]
100
+ impl < T > Encodable for BTreeSet < T >
101
+ where T : Encodable + PartialEq + Ord
102
+ {
112
103
fn encode < S : Encoder > ( & self , s : & mut S ) -> Result < ( ) , S :: Error > {
113
104
s. emit_seq ( self . len ( ) , |s| {
114
105
let mut i = 0 ;
@@ -121,10 +112,9 @@ impl<
121
112
}
122
113
}
123
114
124
- impl <
125
- T : Decodable + PartialEq + Ord
126
- > Decodable for BTreeSet < T > {
127
- #[ inline]
115
+ impl < T > Decodable for BTreeSet < T >
116
+ where T : Decodable + PartialEq + Ord
117
+ {
128
118
fn decode < D : Decoder > ( d : & mut D ) -> Result < BTreeSet < T > , D :: Error > {
129
119
d. read_seq ( |d, len| {
130
120
let mut set = BTreeSet :: new ( ) ;
@@ -141,7 +131,6 @@ impl<K, V, S> Encodable for HashMap<K, V, S>
141
131
V : Encodable ,
142
132
S : BuildHasher ,
143
133
{
144
- #[ inline]
145
134
fn encode < E : Encoder > ( & self , e : & mut E ) -> Result < ( ) , E :: Error > {
146
135
e. emit_map ( self . len ( ) , |e| {
147
136
let mut i = 0 ;
@@ -160,7 +149,6 @@ impl<K, V, S> Decodable for HashMap<K, V, S>
160
149
V : Decodable ,
161
150
S : BuildHasher + Default ,
162
151
{
163
- #[ inline]
164
152
fn decode < D : Decoder > ( d : & mut D ) -> Result < HashMap < K , V , S > , D :: Error > {
165
153
d. read_map ( |d, len| {
166
154
let state = Default :: default ( ) ;
@@ -179,7 +167,6 @@ impl<T, S> Encodable for HashSet<T, S>
179
167
where T : Encodable + Hash + Eq ,
180
168
S : BuildHasher ,
181
169
{
182
- #[ inline]
183
170
fn encode < E : Encoder > ( & self , s : & mut E ) -> Result < ( ) , E :: Error > {
184
171
s. emit_seq ( self . len ( ) , |s| {
185
172
let mut i = 0 ;
@@ -196,7 +183,6 @@ impl<T, S> Decodable for HashSet<T, S>
196
183
where T : Decodable + Hash + Eq ,
197
184
S : BuildHasher + Default ,
198
185
{
199
- #[ inline]
200
186
fn decode < D : Decoder > ( d : & mut D ) -> Result < HashSet < T , S > , D :: Error > {
201
187
d. read_seq ( |d, len| {
202
188
let state = Default :: default ( ) ;
@@ -210,7 +196,6 @@ impl<T, S> Decodable for HashSet<T, S>
210
196
}
211
197
212
198
impl < T : Encodable > Encodable for Rc < [ T ] > {
213
- #[ inline]
214
199
fn encode < E : Encoder > ( & self , s : & mut E ) -> Result < ( ) , E :: Error > {
215
200
s. emit_seq ( self . len ( ) , |s| {
216
201
for ( index, e) in self . iter ( ) . enumerate ( ) {
@@ -222,7 +207,6 @@ impl<T: Encodable> Encodable for Rc<[T]> {
222
207
}
223
208
224
209
impl < T : Decodable > Decodable for Rc < [ T ] > {
225
- #[ inline]
226
210
fn decode < D : Decoder > ( d : & mut D ) -> Result < Rc < [ T ] > , D :: Error > {
227
211
d. read_seq ( |d, len| {
228
212
let mut vec = Vec :: with_capacity ( len) ;
@@ -235,7 +219,6 @@ impl<T: Decodable> Decodable for Rc<[T]> {
235
219
}
236
220
237
221
impl < T : Encodable > Encodable for Arc < [ T ] > {
238
- #[ inline]
239
222
fn encode < E : Encoder > ( & self , s : & mut E ) -> Result < ( ) , E :: Error > {
240
223
s. emit_seq ( self . len ( ) , |s| {
241
224
for ( index, e) in self . iter ( ) . enumerate ( ) {
@@ -247,7 +230,6 @@ impl<T: Encodable> Encodable for Arc<[T]> {
247
230
}
248
231
249
232
impl < T : Decodable > Decodable for Arc < [ T ] > {
250
- #[ inline]
251
233
fn decode < D : Decoder > ( d : & mut D ) -> Result < Arc < [ T ] > , D :: Error > {
252
234
d. read_seq ( |d, len| {
253
235
let mut vec = Vec :: with_capacity ( len) ;
0 commit comments