diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2024-07-25 17:32:00 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2024-07-25 17:32:00 +0300 |
| commit | e33db4f51c74ab5f2f29d8bbbab36c629a4758de (patch) | |
| tree | 3e340e031670fde377a7b64f28a2220ace8103e2 /src/i3bar_protocol.rs | |
| parent | 4619003ad43ea257ba622beec9633f8c3f05d6a4 (diff) | |
| download | i3bar-mango-e33db4f51c74ab5f2f29d8bbbab36c629a4758de.tar.gz | |
slice::trim_ascii_start is stable
Diffstat (limited to 'src/i3bar_protocol.rs')
| -rw-r--r-- | src/i3bar_protocol.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i3bar_protocol.rs b/src/i3bar_protocol.rs index 8fdb0e2..d7d3f3e 100644 --- a/src/i3bar_protocol.rs +++ b/src/i3bar_protocol.rs @@ -1,7 +1,7 @@ use crate::color::Color; use crate::pointer_btn::PointerBtn; use crate::text::Align; -use crate::utils::{de_first_json, de_last_json, last_line, trim_ascii_start}; +use crate::utils::{de_first_json, de_last_json, last_line}; use serde::{de, Deserialize, Serialize}; use std::io::{self, Error, ErrorKind}; @@ -116,7 +116,7 @@ impl Protocol { } None => Ok(bytes), }, - Self::JsonNotStarted { header } => match trim_ascii_start(bytes) { + Self::JsonNotStarted { header } => match bytes.trim_ascii_start() { [] => Ok(&[]), [b'[', rem @ ..] => { *self = Self::Json { |
