File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use live_reload::FileWatcher;
2020
2121use crate :: cmd:: CommandArgs ;
2222use crate :: config:: Config ;
23- use crate :: parse:: SyntaxToken ;
23+ use crate :: parse:: { ContentType , SyntaxToken } ;
2424use crate :: tree:: Tree ;
2525use crate :: ui:: { App , HeaderContext } ;
2626
@@ -77,6 +77,9 @@ fn run() -> Result<()> {
7777 } ;
7878
7979 if let Some ( target_type) = args. to {
80+ if matches ! ( target_type, ContentType :: Any ) {
81+ bail ! ( "target content type cannot be 'any' when using '--to' option" ) ;
82+ }
8083 let parser = content_type. new_parser ( ) ;
8184 let target_parser = target_type. new_parser ( ) ;
8285
Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ pub enum ContentType {
2525 Hcl ,
2626
2727 /// Useful for some logs file: <https://jsonlines.org/>
28- Jsonl ,
2928 // TODO: check out json-seq as specified in RFC7464 (https://datatracker.ietf.org/doc/html/rfc7464)?
3029 // basically jsonl but every json object is prefixed with 0x1e
30+ Jsonl ,
31+
32+ #[ clap( skip) ]
3133 Any ,
3234}
3335
You can’t perform that action at this time.
0 commit comments