forked from NotAShelf/beer
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:
parent
aea1e9cd92
commit
1f8350b26f
1 changed files with 1 additions and 3 deletions
|
|
@ -115,9 +115,7 @@ impl TextSize {
|
||||||
/// default (ordinary text).
|
/// default (ordinary text).
|
||||||
pub fn parse(meta: &[u8]) -> TextSize {
|
pub fn parse(meta: &[u8]) -> TextSize {
|
||||||
let mut ts = TextSize::default();
|
let mut ts = TextSize::default();
|
||||||
if meta.is_empty() {
|
|
||||||
return ts;
|
|
||||||
}
|
|
||||||
for pair in meta.split(|&b| b == b':') {
|
for pair in meta.split(|&b| b == b':') {
|
||||||
let Some(eq) = pair.iter().position(|&b| b == b'=') else {
|
let Some(eq) = pair.iter().position(|&b| b == b'=') else {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue