diff options
Diffstat (limited to 'src/exception.rs')
-rw-r--r-- | src/exception.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/exception.rs b/src/exception.rs index 52f0cf6d..125e4843 100644 --- a/src/exception.rs +++ b/src/exception.rs @@ -1,5 +1,4 @@ use std::fmt::{self, Debug, Display}; -use std::slice; /// Exception thrown from an `extern "C"` function. #[derive(Debug)] @@ -20,10 +19,3 @@ impl Exception { &self.what } } - -#[export_name = "cxxbridge03$exception"] -unsafe extern "C" fn exception(ptr: *const u8, len: usize) -> *const u8 { - let slice = slice::from_raw_parts(ptr, len); - let boxed = String::from_utf8_lossy(slice).into_owned().into_boxed_str(); - Box::leak(boxed).as_ptr() -} |