I'll preface with this saying I am fairly new to rust but....
Description
Whilst trying to create a CLI tool using r2pipe.rs to process a folder full of binaries of interest, I have been having some issues programmatically retrieving the file paths and getting them into &'static str types. From reading online, the only way of converting String types into &'static str is to essentially leak the String which isn't ideal! It may make the functions interface more ergonomic if it was refactored to something else such as AsRef<str>?
Please describe what are you missing or wanting to be improved
I dug further into this and found out that the input object has to be 'static str' and there is no work around forstd::thread`. I fixed my ownership and closures and it works fine now :)
I'll preface with this saying I am fairly new to rust but....
Description
Whilst trying to create a CLI tool using
r2pipe.rs
to process a folder full of binaries of interest, I have been having some issues programmatically retrieving the file paths and getting them into&'static str
types. From reading online, the only way of convertingString
types into&'static str
is to essentially leak the String which isn't ideal! It may make the functions interface more ergonomic if it was refactored to something else such asAsRef<str>
?Please describe what are you missing or wanting to be improved
An ergonomic interface for
R2pipe::threads