@@ -2,20 +2,15 @@ use std::borrow::Cow;
22use std:: ffi:: CString ;
33
44use crate :: error:: Error ;
5- use crate :: format:: InputFormat ;
65use crate :: format:: OutputFormat ;
76use crate :: log_level:: LogLevel ;
87
98#[ derive( Debug ) ]
109pub enum Arg < ' a > {
1110 /// --config-file=<value>
1211 ConfigFilePath ( Cow < ' a , str > ) ,
13- /// --database=<value>
14- Database ( Cow < ' a , str > ) ,
1512 /// --log-level=<value>
1613 LogLevel ( LogLevel ) ,
17- /// --input-format=<value>
18- InputFormat ( InputFormat ) ,
1914 /// --output-format=<value>
2015 OutputFormat ( OutputFormat ) ,
2116 /// --multiquery
@@ -39,9 +34,7 @@ impl<'a> Arg<'a> {
3934 pub ( crate ) fn to_cstring ( & self ) -> Result < CString , Error > {
4035 Ok ( match self {
4136 Self :: ConfigFilePath ( v) => CString :: new ( format ! ( "--config-file={}" , v) ) ,
42- Self :: Database ( v) => CString :: new ( format ! ( "--database={}" , v) ) ,
4337 Self :: LogLevel ( v) => CString :: new ( format ! ( "--log-level={}" , v. as_str( ) ) ) ,
44- Self :: InputFormat ( v) => CString :: new ( format ! ( "--input-format={}" , v. as_str( ) ) ) ,
4538 Self :: OutputFormat ( v) => CString :: new ( format ! ( "--output-format={}" , v. as_str( ) ) ) ,
4639 Self :: MultiQuery => CString :: new ( "-n" ) ,
4740 Self :: Custom ( k, v) => match v {
0 commit comments