diff --git a/src/lib.rs b/src/lib.rs index 217265b..44338c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,6 @@ extern crate libc; use libc::{c_char, c_float, c_int, c_uchar}; use std::borrow::Cow; -use std::convert::From; use std::ffi::CStr; use std::mem; use std::ptr; @@ -93,16 +92,6 @@ impl<'a> ImStr<'a> { fn as_ptr(&self) -> *const c_char { self.bytes.as_ptr() as *const c_char } } -impl<'a> From<&'a str> for ImStr<'a> { - fn from(value: &'a str) -> ImStr<'a> { - let mut bytes: Vec = value.bytes().collect(); - bytes.push(0); - ImStr { - bytes: Cow::Owned(bytes) - } - } -} - impl From for ImStr<'static> { fn from(mut value: String) -> ImStr<'static> { value.push('\0');