File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,13 @@ header! {
7373
7474impl Connection {
7575 /// A constructor to easily create a `Connection: close` header.
76+ #[ inline]
7677 pub fn close ( ) -> Connection {
7778 Connection ( vec ! [ ConnectionOption :: Close ] )
7879 }
7980
8081 /// A constructor to easily create a `Connection: keep-alive` header.
82+ #[ inline]
8183 pub fn keep_alive ( ) -> Connection {
8284 Connection ( vec ! [ ConnectionOption :: KeepAlive ] )
8385 }
Original file line number Diff line number Diff line change @@ -36,26 +36,31 @@ header! {
3636
3737impl ContentType {
3838 /// A constructor to easily create a `Content-Type: application/json; charset=utf-8` header.
39+ #[ inline]
3940 pub fn json ( ) -> ContentType {
4041 ContentType ( mime ! ( Application /Json ; Charset =Utf8 ) )
4142 }
4243
4344 /// A constructor to easily create a `Content-Type: text/plain; charset=utf-8` header.
45+ #[ inline]
4446 pub fn plaintext ( ) -> ContentType {
4547 ContentType ( mime ! ( Text /Plain ; Charset =Utf8 ) )
4648 }
4749
4850 /// A constructor to easily create a `Content-Type: text/html; charset=utf-8` header.
51+ #[ inline]
4952 pub fn html ( ) -> ContentType {
5053 ContentType ( mime ! ( Text /Html ; Charset =Utf8 ) )
5154 }
5255
5356 /// A constructor to easily create a `Content-Type: image/jpeg` header.
57+ #[ inline]
5458 pub fn jpeg ( ) -> ContentType {
5559 ContentType ( mime ! ( Image /Jpeg ) )
5660 }
5761
5862 /// A constructor to easily create a `Content-Type: image/png` header.
63+ #[ inline]
5964 pub fn png ( ) -> ContentType {
6065 ContentType ( mime ! ( Image /Png ) )
6166 }
You can’t perform that action at this time.
0 commit comments