From b8eea9364a71a253ddc2b12bc404cd9a7e3c2e3c Mon Sep 17 00:00:00 2001 From: ringsaturn Date: Mon, 21 Aug 2023 23:55:54 +0800 Subject: [PATCH] Update README --- README.md | 6 +++++- src/main.rs | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61ff853..a3a4132 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,16 @@ Build with [`tidwall/redcon.rs`](https://github.com/tidwall/redcon.rs) and [`ringsaturn/tzf-rs`](https://github.com/ringsaturn/tzf-rs). -Install(only cargo is supported by now): +## Install + +### Via `cargo`` ```bash cargo install redizone ``` +## Usage + ```console $ redis-cli -p 6380 127.0.0.1:6380> get_tz 116.3883 39.9289 diff --git a/src/main.rs b/src/main.rs index 4c5b3fd..2bc41db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,6 @@ fn main() { } let lat = lat_result.unwrap(); conn.write_string(db.get_tz_name(lng, lat)); - return; } "get_tzs" => { if args.len() != 3 { @@ -50,7 +49,6 @@ fn main() { for tz in tzs { conn.write_bulk(tz.as_bytes()); } - return; } _ => conn.write_error("ERR unknown command"), }