From aeee6b97a326e3d47c29e5adc91b5a1cb7c81080 Mon Sep 17 00:00:00 2001 From: Marc Planard Date: Mon, 19 Aug 2024 14:46:25 +0200 Subject: [PATCH] remove serde_json as it's useless --- Cargo.toml | 1 - examples/simple_client.rs | 2 +- src/main.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0631d62..ca0464a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,3 @@ ron = "0.8.0" serde = { version = "1.0.163", features = ["derive"] } toml = "0.7.4" nalgebra = "0.32.2" -serde_json = "1.0.125" diff --git a/examples/simple_client.rs b/examples/simple_client.rs index fab3c6b..6ed507f 100644 --- a/examples/simple_client.rs +++ b/examples/simple_client.rs @@ -10,7 +10,7 @@ use redis::{ use std::thread::sleep; use std::time::{Duration, Instant}; -const SCALE: f32 = 500.0; +const SCALE: f32 = 20.0; fn do_something() -> redis::RedisResult<()> { let client = Client::open("redis://127.0.0.1/")?; diff --git a/src/main.rs b/src/main.rs index ba8229b..073268a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,7 @@ fn run_all() -> LJResult<()> { let s = std::str::from_utf8(&buff2[0..n]).unwrap(); buff.push_str(&s); - if buff2[n - 1] == 0 { + if n == 0 || buff2[n - 1] == 0 { let config = toml::from_str(&buff[0..buff.len() - 1])?; break Ok(config); }