File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " udp-request"
3- version = " 0.3.3 "
3+ version = " 0.3.4 "
44readme = " README.md"
55edition = " 2024"
66authors = [" root@ltpp.vip" ]
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ impl ResponseTrait for UdpResponseBinary {
1414 /// # Returns
1515 ///
1616 /// - `Self` - A new `UdpResponseBinary` instance.
17+ #[ inline]
1718 fn from ( response : & [ u8 ] ) -> Self
1819 where
1920 Self : Sized ,
@@ -26,6 +27,7 @@ impl ResponseTrait for UdpResponseBinary {
2627 /// # Returns
2728 ///
2829 /// - `Self::OutputBinary` - The binary data of the response.
30+ #[ inline]
2931 fn binary ( & self ) -> Self :: OutputBinary {
3032 self . clone ( )
3133 }
@@ -35,6 +37,7 @@ impl ResponseTrait for UdpResponseBinary {
3537 /// # Returns
3638 ///
3739 /// - `UdpResponseText` - The text representation of the response, with invalid UTF-8 sequences replaced.
40+ #[ inline]
3841 fn text ( & self ) -> UdpResponseText {
3942 let data: String = String :: from_utf8_lossy ( & self ) . to_string ( ) ;
4043 data
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ impl ResponseTrait for UdpResponseText {
1717 /// # Returns
1818 ///
1919 /// - `Self::OutputText` - The text representation of the response.
20+ #[ inline]
2021 fn from ( response : & [ u8 ] ) -> Self :: OutputText
2122 where
2223 Self : Sized ,
@@ -29,6 +30,7 @@ impl ResponseTrait for UdpResponseText {
2930 /// # Returns
3031 ///
3132 /// - `Self::OutputText` - The text data of the response.
33+ #[ inline]
3234 fn text ( & self ) -> Self :: OutputText {
3335 self . clone ( )
3436 }
@@ -38,6 +40,7 @@ impl ResponseTrait for UdpResponseText {
3840 /// # Returns
3941 ///
4042 /// - `UdpResponseBinary` - The binary representation of the response.
43+ #[ inline]
4144 fn binary ( & self ) -> UdpResponseBinary {
4245 self . clone ( ) . into_bytes ( )
4346 }
You can’t perform that action at this time.
0 commit comments