File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,23 +18,26 @@ impl<W: Write> From<W> for Encoder<W> {
18
18
impl < W : Write > Write for Encoder < W > {
19
19
type Error = W :: Error ;
20
20
21
+ #[ inline]
21
22
fn write_all ( & mut self , data : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
22
23
self . 0 . write_all ( data)
23
24
}
24
25
26
+ #[ inline]
25
27
fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
26
28
self . 0 . flush ( )
27
29
}
28
30
}
29
31
30
32
impl < W : Write > Encoder < W > {
31
33
/// Unwraps the `Write`, consuming the `Encoder`.
34
+ #[ inline]
32
35
pub fn into_inner ( self ) -> W {
33
36
self . 0
34
37
}
35
38
36
39
/// Push a `Header` to the wire
37
- #[ inline]
40
+ #[ inline( always ) ]
38
41
pub fn push ( & mut self , header : Header ) -> Result < ( ) , W :: Error > {
39
42
let title = Title :: from ( header) ;
40
43
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ pub enum Header {
75
75
impl TryFrom < Title > for Header {
76
76
type Error = InvalidError ;
77
77
78
+ #[ inline]
78
79
fn try_from ( title : Title ) -> Result < Self , Self :: Error > {
79
80
let opt = |minor| {
80
81
Some ( match minor {
@@ -116,6 +117,7 @@ impl TryFrom<Title> for Header {
116
117
}
117
118
118
119
impl From < Header > for Title {
120
+ #[ inline( always) ]
119
121
fn from ( header : Header ) -> Self {
120
122
let int = |i : u64 | match i {
121
123
x if x <= 23 => Minor :: This ( i as u8 ) ,
You can’t perform that action at this time.
0 commit comments