use smallvec for the edu sending event buffer

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-01-26 21:47:52 +00:00
parent ffd0fd4242
commit 99fe88c21e
7 changed files with 64 additions and 40 deletions

View file

@ -202,7 +202,7 @@ fn parse_servercurrentevent(key: &[u8], value: &[u8]) -> Result<(Destination, Se
if value.is_empty() {
SendingEvent::Pdu(event.into())
} else {
SendingEvent::Edu(value.to_vec())
SendingEvent::Edu(value.into())
},
)
} else if key.starts_with(b"$") {
@ -230,7 +230,7 @@ fn parse_servercurrentevent(key: &[u8], value: &[u8]) -> Result<(Destination, Se
SendingEvent::Pdu(event.into())
} else {
// I'm pretty sure this should never be called
SendingEvent::Edu(value.to_vec())
SendingEvent::Edu(value.into())
},
)
} else {
@ -252,7 +252,7 @@ fn parse_servercurrentevent(key: &[u8], value: &[u8]) -> Result<(Destination, Se
if value.is_empty() {
SendingEvent::Pdu(event.into())
} else {
SendingEvent::Edu(value.to_vec())
SendingEvent::Edu(value.into())
},
)
})