ucase for ASCII only

This is a silly optimization but can be significantly faster for larger
action names. Also, since there are (should be) no UTF-8 characters in
the first argument, this is absolutely fine and sensible.
next
Sayan Nandan 3 years ago
parent a68c42f720
commit f8ea4c33de

@ -81,7 +81,7 @@ where
Strm: AsyncReadExt + AsyncWriteExt + Unpin + Send + Sync, Strm: AsyncReadExt + AsyncWriteExt + Unpin + Send + Sync,
{ {
let first = match buf.get_first() { let first = match buf.get_first() {
Some(element) => element.to_uppercase(), Some(element) => element.to_ascii_uppercase(),
None => return con.write_response(&**responses::groups::PACKET_ERR).await, None => return con.write_response(&**responses::groups::PACKET_ERR).await,
}; };
gen_match!( gen_match!(

Loading…
Cancel
Save