@@ -17,41 +17,41 @@ fn main() {
17
17
fn run ( ) -> Result < ( ) , String > {
18
18
let command = {
19
19
Command :: new ( env ! ( "CARGO_BIN_NAME" ) )
20
- . about (
21
- "\
22
- Compile the given Simfony program and print the resulting Simplicity base64 string.\n \
23
- If a Simfony witness is provided, then use it to satisfy the program (requires \
24
- feature 'serde' to be enabled).\
25
- "
26
- )
27
- . arg (
28
- Arg :: new ( "prog_file" )
29
- . required ( true )
30
- . value_name ( "PROGRAM_FILE" )
31
- . action ( ArgAction :: Set )
32
- . help ( "Simfony program file to build" )
33
- )
20
+ . about (
21
+ "\
22
+ Compile the given Simfony program and print the resulting Simplicity base64 string.\n \
23
+ If a Simfony witness is provided, then use it to satisfy the program (requires \
24
+ feature 'serde' to be enabled).\
25
+ " ,
26
+ )
27
+ . arg (
28
+ Arg :: new ( "prog_file" )
29
+ . required ( true )
30
+ . value_name ( "PROGRAM_FILE" )
31
+ . action ( ArgAction :: Set )
32
+ . help ( "Simfony program file to build" ) ,
33
+ )
34
34
} ;
35
35
36
36
#[ cfg( feature = "serde" ) ]
37
37
let command = {
38
38
command. arg (
39
39
Arg :: new ( "wit_file" )
40
- . value_name ( "WITNESS_FILE" )
41
- . action ( ArgAction :: Set )
42
- . help ( "File containing the witness data" )
40
+ . value_name ( "WITNESS_FILE" )
41
+ . action ( ArgAction :: Set )
42
+ . help ( "File containing the witness data" ) ,
43
43
)
44
44
} ;
45
45
46
46
let matches = {
47
47
command
48
- . arg (
49
- Arg :: new ( "debug" )
50
- . long ( "debug" )
51
- . action ( ArgAction :: SetTrue )
52
- . help ( "Include debug symbols in the output" )
53
- )
54
- . get_matches ( )
48
+ . arg (
49
+ Arg :: new ( "debug" )
50
+ . long ( "debug" )
51
+ . action ( ArgAction :: SetTrue )
52
+ . help ( "Include debug symbols in the output" ) ,
53
+ )
54
+ . get_matches ( )
55
55
} ;
56
56
57
57
let prog_file = matches. get_one :: < String > ( "prog_file" ) . unwrap ( ) ;
@@ -64,14 +64,14 @@ fn run() -> Result<(), String> {
64
64
#[ cfg( feature = "serde" ) ]
65
65
let witness_opt = {
66
66
matches
67
- . get_one :: < String > ( "wit_file" )
68
- . map ( |wit_file| -> Result < simfony:: WitnessValues , String > {
69
- let wit_path = std:: path:: Path :: new ( wit_file) ;
70
- let wit_text = std:: fs:: read_to_string ( wit_path) . map_err ( |e| e. to_string ( ) ) ?;
71
- let witness = serde_json:: from_str :: < simfony:: WitnessValues > ( & wit_text) . unwrap ( ) ;
72
- Ok ( witness)
73
- } )
74
- . transpose ( ) ?
67
+ . get_one :: < String > ( "wit_file" )
68
+ . map ( |wit_file| -> Result < simfony:: WitnessValues , String > {
69
+ let wit_path = std:: path:: Path :: new ( wit_file) ;
70
+ let wit_text = std:: fs:: read_to_string ( wit_path) . map_err ( |e| e. to_string ( ) ) ?;
71
+ let witness = serde_json:: from_str :: < simfony:: WitnessValues > ( & wit_text) . unwrap ( ) ;
72
+ Ok ( witness)
73
+ } )
74
+ . transpose ( ) ?
75
75
} ;
76
76
#[ cfg( not( feature = "serde" ) ) ]
77
77
let witness_opt: Option < simfony:: WitnessValues > = None ;
@@ -97,4 +97,3 @@ fn run() -> Result<(), String> {
97
97
98
98
Ok ( ( ) )
99
99
}
100
-
0 commit comments