diff options
| author | Rubens Brandao <git@rubens.io> | 2024-05-27 17:53:57 -0300 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2024-05-28 17:11:23 -0400 |
| commit | fce26815b400b5d3c0b67a46085ba8c9a61c1457 (patch) | |
| tree | c2828f1147586ca1f5b5235aad27c700d138226b /rust/src/headless.rs | |
| parent | 53eed1fedbef8c778ba1ea03d6660a7f097886ca (diff) | |
update `Session::load_with_option` to the new API
Diffstat (limited to 'rust/src/headless.rs')
| -rw-r--r-- | rust/src/headless.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rust/src/headless.rs b/rust/src/headless.rs index 15754aba..d4d8892a 100644 --- a/rust/src/headless.rs +++ b/rust/src/headless.rs @@ -14,9 +14,8 @@ use crate::{ binaryview, - metadata::Metadata, - rc::{self, Ref}, - string::BnStrCompatible, + rc, + string::{BnStrCompatible, IntoJson}, }; use std::env; @@ -146,11 +145,11 @@ impl Session { /// let bv = headless_session.load_with_options("/bin/cat", true, Some(settings)) /// .expect("Couldn't open `/bin/cat`"); /// ``` - pub fn load_with_options( + pub fn load_with_options<O: IntoJson>( &self, filename: &str, update_analysis_and_wait: bool, - options: Option<Ref<Metadata>>, + options: Option<O>, ) -> Option<rc::Ref<binaryview::BinaryView>> { crate::load_with_options(filename, update_analysis_and_wait, options) } |
