mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
c72adf883c
commit
4304bbc92f
3 changed files with 3 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ impl FromStr for Payload<'_> {
|
|||
type Err = anyhow::Error;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let mut parts = s.splitn(5, ',');
|
||||
let mut parts = s.splitn(4, ',');
|
||||
|
||||
let kind = parts.next().ok_or_else(|| anyhow!("empty kind"))?;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ impl Server {
|
|||
continue;
|
||||
}
|
||||
|
||||
let mut parts = line.splitn(5, ',');
|
||||
let mut parts = line.splitn(4, ',');
|
||||
let Some(id) = id else { continue };
|
||||
let Some(kind) = parts.next() else { continue };
|
||||
let Some(receiver) = parts.next().and_then(|s| s.parse().ok()) else { continue };
|
||||
|
|
@ -62,7 +62,6 @@ impl Server {
|
|||
}
|
||||
|
||||
if receiver == 0 && sender <= u16::MAX as u64 {
|
||||
let Some(_) = parts.next() else { continue };
|
||||
let Some(body) = parts.next() else { continue };
|
||||
if !STATE.set(kind, sender as u16, body) { continue }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ impl State {
|
|||
|
||||
let mut inner = HashMap::new();
|
||||
while buf.read_line(&mut line).await? > 0 {
|
||||
let mut parts = line.splitn(5, ',');
|
||||
let mut parts = line.splitn(4, ',');
|
||||
let Some(kind) = parts.next() else { continue };
|
||||
let Some(_) = parts.next() else { continue };
|
||||
let Some(severity) = parts.next().and_then(|s| s.parse::<u16>().ok()) else { continue };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue