File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,17 @@ pub fn main() {
5252 binaryninja:: headless:: Session :: new ( ) . expect ( "Failed to initialize session" ) ;
5353
5454 println ! ( "Registering workflow..." ) ;
55- let old_meta_workflow = Workflow :: get ( "core.function.metaAnalysis" ) ;
55+ let old_meta_workflow =
56+ Workflow :: get ( "core.function.metaAnalysis" ) . expect ( "Couldn't find meta workflow" ) ;
5657 let meta_workflow = old_meta_workflow. clone_to ( "core.function.metaAnalysis" ) ;
5758 let activity = Activity :: new_with_action ( RUST_ACTIVITY_CONFIG , example_activity) ;
58- meta_workflow. register_activity ( & activity) . unwrap ( ) ;
59- meta_workflow. insert ( "core.function.runFunctionRecognizers" , [ RUST_ACTIVITY_NAME ] ) ;
60- // Re-register the meta workflow with our changes.
61- meta_workflow. register ( ) . unwrap ( ) ;
59+ meta_workflow
60+ . register_activity ( & activity)
61+ . expect ( "Couldn't register activity" )
62+ . insert ( "core.function.runFunctionRecognizers" , [ RUST_ACTIVITY_NAME ] )
63+ . expect ( "Couldn't insert activity" )
64+ . register ( )
65+ . expect ( "Couldn't register workflow" ) ;
6266
6367 println ! ( "Loading binary..." ) ;
6468 let bv = headless_session
You can’t perform that action at this time.
0 commit comments