mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-02-19 07:38:02 +00:00
Move let_cxx_string's $value evaluation outside of unsafe block
This commit is contained in:
parent
fe67bf4b6a
commit
c4a3ede519
@ -73,7 +73,9 @@ macro_rules! let_cxx_string {
|
||||
($var:ident = $value:expr $(,)?) => {
|
||||
let mut $var = $crate::private::StackString::new();
|
||||
#[allow(unused_mut, unused_unsafe)]
|
||||
let mut $var = unsafe { $var.init($value) };
|
||||
let mut $var = match $value {
|
||||
let_cxx_string => unsafe { $var.init(let_cxx_string) },
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user