File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- msrv = " 1.79.0"
21# We have an error type, `RichError`, of size 144. This is pushing it but probably fine.
32large-error-threshold = 145
43
5- doc-valid-idents = [ " SimplicityHL" ]
4+ doc-valid-idents = [ " SimplicityHL" ]
Original file line number Diff line number Diff line change @@ -554,6 +554,7 @@ pub(crate) mod tests {
554554 }
555555 }
556556
557+ #[ cfg( feature = "serde" ) ]
557558 pub fn get_encoding ( self ) -> String {
558559 let program_bytes = self . program . commit ( ) . to_vec_without_witness ( ) ;
559560 Base64Display :: new ( & program_bytes, & STANDARD ) . to_string ( )
@@ -615,6 +616,7 @@ pub(crate) mod tests {
615616 }
616617 }
617618
619+ #[ cfg( feature = "serde" ) ]
618620 pub fn get_encoding_with_witness ( self ) -> ( String , String ) {
619621 let ( program_bytes, witness_bytes) = self . program . redeem ( ) . to_vec_with_witness ( ) ;
620622 (
Original file line number Diff line number Diff line change @@ -236,14 +236,20 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
236236
237237 if output_json {
238238 #[ cfg( not( feature = "serde" ) ) ]
239- return Err (
240- "Program was compiled without the 'serde' feature and cannot output JSON." . into ( ) ,
241- ) ;
239+ {
240+ return Err (
241+ "Program was compiled without the 'serde' feature and cannot output JSON." . into ( ) ,
242+ ) ;
243+ }
244+
242245 #[ cfg( feature = "serde" ) ]
243- println ! ( "{}" , serde_json:: to_string( & output) ?) ;
244- } else {
245- println ! ( "{}" , output) ;
246+ {
247+ println ! ( "{}" , serde_json:: to_string( & output) ?) ;
248+ return Ok ( ( ) ) ;
249+ }
246250 }
247251
252+ println ! ( "{}" , output) ;
253+
248254 Ok ( ( ) )
249255}
You can’t perform that action at this time.
0 commit comments