File tree 2 files changed +4
-4
lines changed
crates/utils/src/commands/witness
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ pub struct DumpWitnessCommand {
68
68
}
69
69
70
70
impl DumpWitnessCommand {
71
- pub async fn run ( self ) -> anyhow:: Result < ( ) > {
71
+ pub async fn run ( self ) -> anyhow:: Result < BlockWitness > {
72
72
let started = Instant :: now ( ) ;
73
73
74
74
if self . out_dir . is_file ( ) {
75
75
anyhow:: bail!( "Output path is a file" ) ;
76
76
}
77
77
std:: fs:: create_dir_all ( & self . out_dir ) ?;
78
78
if !self . json && !self . rkyv {
79
- anyhow :: bail !( "No output format specified" ) ;
79
+ eprintln ! ( "{} No output format specified" , Emoji ( "⚠️ " , "" ) ) ;
80
80
}
81
81
82
82
if self . ancestors < 1 || self . ancestors > 256 {
@@ -259,7 +259,7 @@ impl DumpWitnessCommand {
259
259
Emoji ( "✨ " , ":-)" ) ,
260
260
HumanDuration ( started. elapsed( ) )
261
261
) ;
262
- Ok ( ( ) )
262
+ Ok ( witness )
263
263
}
264
264
}
265
265
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ pub enum WitnessCommands {
14
14
impl WitnessCommands {
15
15
pub async fn run ( self ) -> anyhow:: Result < ( ) > {
16
16
match self {
17
- WitnessCommands :: Dump ( cmd) => cmd. run ( ) . await ,
17
+ WitnessCommands :: Dump ( cmd) => cmd. run ( ) . await . map ( |_| ( ) ) ,
18
18
WitnessCommands :: Rkyv ( cmd) => cmd. run ( ) . await ,
19
19
}
20
20
}
You can’t perform that action at this time.
0 commit comments