beer-protocols/text-size: drop unneeded check in parse function

Co-authored-by: faukah <fau@faukah.com>
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibf562e5c37f3873726ccfbf87d2626106a6a6964
This commit is contained in:
raf 2026-06-27 01:41:54 +03:00
commit 1f8350b26f
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

View file

@ -115,9 +115,7 @@ impl TextSize {
/// default (ordinary text).
pub fn parse(meta: &[u8]) -> TextSize {
let mut ts = TextSize::default();
if meta.is_empty() {
return ts;
}
for pair in meta.split(|&b| b == b':') {
let Some(eq) = pair.iter().position(|&b| b == b'=') else {
continue;