brewery
notashelf /
db9b53fdadda888e7ffeaa4a113d0348c96db75b

beer

public

A terminal worth pouring time into

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/beer.git

Commit db9b53fdadda

tarball

NotAShelf <raf@notashelf.dev> · 2026-06-26 22:47 UTC

unverified1 files changed+2-1
beer-protocols/graphics: simplify parse function

Co-authored-by: faukah <fau@faukah.com>
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibe83c5e6f06ab1c9900f759ac4940ce86a6a6964
diff --git a/crates/beer-protocols/src/graphics.rs b/crates/beer-protocols/src/graphics.rsindex ffe0308..dc03de7 100644--- a/crates/beer-protocols/src/graphics.rs+++ b/crates/beer-protocols/src/graphics.rs@@ -193,8 +193,9 @@ pub fn parse(control: &[u8]) -> GraphicsCommand {         let Some(eq) = pair.iter().position(|&b| b == b'=') else {             continue;         };-        let (key, value) = (pair.get(..eq).unwrap_or(&[]), &pair[eq + 1..]);+        let (key, value) = pair.split_at(eq);         let [key] = key else { continue };+        let value = &value[1..];         let ch = value.first().copied();         match key {             b'a' => {