@@ -2,20 +2,15 @@ use std::borrow::Cow;
2
2
use std:: ffi:: CString ;
3
3
4
4
use crate :: error:: Error ;
5
- use crate :: format:: InputFormat ;
6
5
use crate :: format:: OutputFormat ;
7
6
use crate :: log_level:: LogLevel ;
8
7
9
8
#[ derive( Debug ) ]
10
9
pub enum Arg < ' a > {
11
10
/// --config-file=<value>
12
11
ConfigFilePath ( Cow < ' a , str > ) ,
13
- /// --database=<value>
14
- Database ( Cow < ' a , str > ) ,
15
12
/// --log-level=<value>
16
13
LogLevel ( LogLevel ) ,
17
- /// --input-format=<value>
18
- InputFormat ( InputFormat ) ,
19
14
/// --output-format=<value>
20
15
OutputFormat ( OutputFormat ) ,
21
16
/// --multiquery
@@ -39,9 +34,7 @@ impl<'a> Arg<'a> {
39
34
pub ( crate ) fn to_cstring ( & self ) -> Result < CString , Error > {
40
35
Ok ( match self {
41
36
Self :: ConfigFilePath ( v) => CString :: new ( format ! ( "--config-file={}" , v) ) ,
42
- Self :: Database ( v) => CString :: new ( format ! ( "--database={}" , v) ) ,
43
37
Self :: LogLevel ( v) => CString :: new ( format ! ( "--log-level={}" , v. as_str( ) ) ) ,
44
- Self :: InputFormat ( v) => CString :: new ( format ! ( "--input-format={}" , v. as_str( ) ) ) ,
45
38
Self :: OutputFormat ( v) => CString :: new ( format ! ( "--output-format={}" , v. as_str( ) ) ) ,
46
39
Self :: MultiQuery => CString :: new ( "-n" ) ,
47
40
Self :: Custom ( k, v) => match v {
0 commit comments