File tree 1 file changed +0
-8
lines changed
1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ use mini_redis::{clients::Client, DEFAULT_PORT};
2
2
3
3
use bytes:: Bytes ;
4
4
use clap:: { Parser , Subcommand } ;
5
- use std:: convert:: Infallible ;
6
5
use std:: num:: ParseIntError ;
7
6
use std:: str;
8
7
use std:: time:: Duration ;
@@ -29,7 +28,6 @@ struct Cli {
29
28
enum Command {
30
29
Ping {
31
30
/// Message to ping
32
- #[ arg( value_parser = bytes_from_str) ]
33
31
msg : Option < Bytes > ,
34
32
} ,
35
33
/// Get the value of key.
@@ -43,7 +41,6 @@ enum Command {
43
41
key : String ,
44
42
45
43
/// Value to set.
46
- #[ arg( value_parser = bytes_from_str) ]
47
44
value : Bytes ,
48
45
49
46
/// Expire the value after specified amount of time
@@ -55,7 +52,6 @@ enum Command {
55
52
/// Name of channel
56
53
channel : String ,
57
54
58
- #[ arg( value_parser = bytes_from_str) ]
59
55
/// Message to publish
60
56
message : Bytes ,
61
57
} ,
@@ -153,7 +149,3 @@ fn duration_from_ms_str(src: &str) -> Result<Duration, ParseIntError> {
153
149
let ms = src. parse :: < u64 > ( ) ?;
154
150
Ok ( Duration :: from_millis ( ms) )
155
151
}
156
-
157
- fn bytes_from_str ( src : & str ) -> Result < Bytes , Infallible > {
158
- Ok ( Bytes :: from ( src. to_string ( ) ) )
159
- }
You can’t perform that action at this time.
0 commit comments