Skip to content

Commit 4c02bc3

Browse files
committed
feat: v0.3.4
1 parent 4a9dca3 commit 4c02bc3

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "udp-request"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
readme = "README.md"
55
edition = "2024"
66
authors = ["root@ltpp.vip"]

src/response/response_binary/impl.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/response/response_text/impl.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)