mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-08-25 12:44:30 -04:00
fmt
This commit is contained in:
+2
-1
@@ -636,7 +636,8 @@ fn osc_response_buf_to_color(response_buf: [u8; 25]) -> Option<i32> {
|
|||||||
let mut color = 0;
|
let mut color = 0;
|
||||||
|
|
||||||
for byte in ascii_hex_bytes {
|
for byte in ascii_hex_bytes {
|
||||||
color = (color << 4) + (match byte {
|
color = (color << 4)
|
||||||
|
+ (match byte {
|
||||||
b'0'..=b'9' => byte - b'0',
|
b'0'..=b'9' => byte - b'0',
|
||||||
b'A'..=b'F' => byte - (b'A' - 10),
|
b'A'..=b'F' => byte - (b'A' - 10),
|
||||||
b'a'..=b'f' => byte - (b'a' - 10),
|
b'a'..=b'f' => byte - (b'a' - 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user