@@ -37,13 +37,13 @@ fn cli() -> errors::Result<Opts> {
37
37
let matches = App :: new ( "csv2html" )
38
38
. version ( "3.0.0" )
39
39
. about ( "Convert CSV files to HTML tables" )
40
- . arg ( Arg :: with_name ( "input" ) . help ( "input file" ) . index ( 1 ) )
40
+ . arg ( Arg :: with_name ( "input" ) . help ( "Input file" ) . index ( 1 ) )
41
41
. arg (
42
42
Arg :: with_name ( "output" )
43
43
. short ( "o" )
44
44
. long ( "output" )
45
45
. value_name ( "OUTPUT" )
46
- . help ( "output file" ) ,
46
+ . help ( "Output file" ) ,
47
47
)
48
48
. arg (
49
49
Arg :: with_name ( "title" )
@@ -57,44 +57,44 @@ fn cli() -> errors::Result<Opts> {
57
57
. short ( "d" )
58
58
. long ( "delimiter" )
59
59
. value_name ( "DELIM" )
60
- . help ( "field delimiter character for CSV (',' by default)" ) ,
60
+ . help ( "Field delimiter character for CSV (',' by default)" ) ,
61
61
)
62
62
. arg (
63
63
Arg :: with_name ( "start" )
64
64
. short ( "s" )
65
65
. long ( "start" )
66
66
. value_name ( "N" )
67
- . help ( "skip the first N-1 rows, start at row N" ) ,
67
+ . help ( "Skip the first N-1 rows; start at row N" ) ,
68
68
)
69
69
. arg (
70
70
Arg :: with_name ( "renumber" )
71
71
. short ( "r" )
72
72
. long ( "renumber" )
73
- . help ( "replace the first column with row numbers" ) ,
73
+ . help ( "Replace the first column with row numbers" ) ,
74
74
)
75
75
. arg (
76
76
Arg :: with_name ( "no-header" )
77
77
. short ( "n" )
78
78
. long ( "no-header" )
79
- . help ( "do not use the first row of the input as the header" ) ,
79
+ . help ( "Do not use the first row of the input as the header" ) ,
80
80
)
81
81
. arg (
82
82
Arg :: with_name ( "complete-document" )
83
83
. short ( "c" )
84
84
. long ( "complete-document" )
85
85
. help (
86
- "output a complete HTML document instead of only a table" ,
86
+ "Output a complete HTML document instead of only a table" ,
87
87
) ,
88
88
)
89
89
. arg (
90
90
Arg :: with_name ( "table" )
91
91
. long ( "table" )
92
92
. value_name ( "ATTRS" )
93
93
. help (
94
- "Attributes for the tag <table> (e.g., --table \
95
- 'foo=\" bar\" baz' results in the output <table \
96
- foo=\" bar\" baz>...</table>); it is up to the \
97
- user to ensure the result is valid HTML",
94
+ "HTML attributes for the tag <table> (e.g., --table \
95
+ 'foo=\" bar\" baz' results in the output <table \
96
+ foo=\" bar\" baz>...</table>); it is up to the \
97
+ user to ensure the result is valid HTML",
98
98
) ,
99
99
)
100
100
. arg (
@@ -240,17 +240,23 @@ fn main() {
240
240
match app ( ) {
241
241
Ok ( _) => exit ( exitcode:: OK ) ,
242
242
Err ( ref err) => match err {
243
- errors:: Error :: OpenInput { filename : _, source : _ }
244
- | errors:: Error :: OpenOutput { filename : _, source : _ }
243
+ errors:: Error :: OpenInput {
244
+ filename : _,
245
+ source : _,
246
+ }
247
+ | errors:: Error :: OpenOutput {
248
+ filename : _,
249
+ source : _,
250
+ }
245
251
| errors:: Error :: WriteOutput { source : _ } => {
246
252
eprintln ! ( "{}" , err) ;
247
253
exit ( exitcode:: IOERR ) ;
248
- } ,
254
+ }
249
255
errors:: Error :: ParseHeader { source : _ }
250
256
| errors:: Error :: ParseRow { source : _ } => {
251
257
eprintln ! ( "{}" , err) ;
252
258
exit ( exitcode:: DATAERR ) ;
253
- } ,
259
+ }
254
260
_ => {
255
261
eprintln ! ( "{}" , err) ;
256
262
exit ( exitcode:: SOFTWARE ) ;
0 commit comments