@@ -22,13 +22,13 @@ use thiserror::Error;
2222
2323use crate :: enterprise:: release_license;
2424use crate :: main_thread:: { MainThreadAction , MainThreadHandler } ;
25+ use crate :: progress:: ProgressCallback ;
2526use crate :: rc:: Ref ;
2627use binaryninjacore_sys:: { BNInitPlugins , BNInitRepoPlugins } ;
2728use std:: sync:: mpsc:: Sender ;
2829use std:: sync:: Mutex ;
2930use std:: thread:: JoinHandle ;
3031use std:: time:: Duration ;
31- use crate :: progress:: ProgressCallback ;
3232
3333static MAIN_THREAD_HANDLE : Mutex < Option < JoinHandle < ( ) > > > = Mutex :: new ( None ) ;
3434
@@ -293,12 +293,16 @@ impl Session {
293293 /// println!("{}/{}", progress, total);
294294 /// true
295295 /// };
296- ///
296+ ///
297297 /// let bv = headless_session
298298 /// .load_with_progress("cat.bndb", print_progress)
299299 /// .expect("Couldn't open `cat.bndb`");
300300 /// ```
301- pub fn load_with_progress ( & self , file_path : impl AsRef < Path > , progress : impl ProgressCallback ) -> Option < Ref < binary_view:: BinaryView > > {
301+ pub fn load_with_progress (
302+ & self ,
303+ file_path : impl AsRef < Path > ,
304+ progress : impl ProgressCallback ,
305+ ) -> Option < Ref < binary_view:: BinaryView > > {
302306 crate :: load_with_progress ( file_path, progress)
303307 }
304308
@@ -333,7 +337,7 @@ impl Session {
333337 /// println!("{}/{}", progress, total);
334338 /// true
335339 /// };
336- ///
340+ ///
337341 /// let settings: Ref<Metadata> =
338342 /// HashMap::from([("analysis.linearSweep.autorun", false.into())]).into();
339343 /// let headless_session = binaryninja::headless::Session::new().unwrap();
@@ -349,7 +353,12 @@ impl Session {
349353 options : Option < O > ,
350354 progress : impl ProgressCallback ,
351355 ) -> Option < Ref < binary_view:: BinaryView > > {
352- crate :: load_with_options_and_progress ( file_path, update_analysis_and_wait, options, progress)
356+ crate :: load_with_options_and_progress (
357+ file_path,
358+ update_analysis_and_wait,
359+ options,
360+ progress,
361+ )
353362 }
354363}
355364
0 commit comments