File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ enum Commands {
8181
8282 /// Define the username:password used to limit access to the server. By default, access is unlimited.
8383 #[ arg( short, long, value_parser = parse_credentials) ]
84- credentials : Option < Credentials > ,
84+ auth : Option < Credentials > ,
8585 } ,
8686 /// Start the webserver in a child process then exit.
8787 Start {
@@ -100,7 +100,7 @@ enum Commands {
100100impl Cli {
101101 fn run ( self , addr : & SocketAddr ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
102102 match & self . command {
103- Commands :: Serve { log, credentials } => {
103+ Commands :: Serve { log, auth : credentials } => {
104104 #[ cfg( debug_assertions) ]
105105 if let Some ( TestMode :: Sleep ) = self . test_mode {
106106 // For testing, don't start the server at all.
@@ -317,7 +317,7 @@ fn parse_credentials(s: &str) -> Result<Credentials, String> {
317317 let split_: Vec < _ > = s. split ( ":" ) . collect ( ) ;
318318 if split_. len ( ) != 2 {
319319 Err ( format ! (
320- "Unable to parse credentials as username:password; found {} colon-separated string(s)" ,
320+ "Unable to parse credentials as username:password; found {} colon-separated string(s), but expected 2 " ,
321321 split_. len( )
322322 ) )
323323 } else {
You can’t perform that action at this time.
0 commit comments