More comments and tweak details (#33)
Co-authored-by: Alice Ryhl <alice@ryhl.io>
This commit is contained in:
@@ -63,6 +63,7 @@ async fn main() -> mini_redis::Result<()> {
|
||||
// Establish a connection
|
||||
let mut client = client::connect(&addr).await?;
|
||||
|
||||
// Process the requested command
|
||||
match cli.command {
|
||||
Command::Get { key } => {
|
||||
if let Some(value) = client.get(&key).await? {
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
//! mini-redis server.
|
||||
//!
|
||||
//! This file is the entry point for the server implemented in the library. It
|
||||
//! performs command line parsing and passes the arguments on to
|
||||
//! `mini_redis::server`.
|
||||
//!
|
||||
//! The `clap` crate is used for parsing arguments.
|
||||
|
||||
use mini_redis::{server, DEFAULT_PORT};
|
||||
|
||||
use clap::Clap;
|
||||
|
||||
Reference in New Issue
Block a user