From 40af63902e0af313722dfdc19a6d10a1d2ba29f4 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 29 Dec 2024 00:18:14 +0300 Subject: Improve attrs_from_sgr_parameters performance Instead of collecting all the data into the vector just dispatch it right away avoiding allocations. --- src/definitions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/definitions.rs') diff --git a/src/definitions.rs b/src/definitions.rs index 218c1eb..568a8a8 100644 --- a/src/definitions.rs +++ b/src/definitions.rs @@ -57,9 +57,9 @@ pub fn unpack(delta: u8) -> (State, Action) { unsafe { ( // State is stored in bottom 4 bits - mem::transmute(delta & 0x0f), + mem::transmute::(delta & 0x0f), // Action is stored in top 4 bits - mem::transmute(delta >> 4), + mem::transmute::(delta >> 4), ) } } -- cgit