mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
device: take advantage of lifetime elision
This commit is contained in:
+2
-2
@@ -18,13 +18,13 @@ impl<'a> Info<'a> {
|
||||
Info { ptr: ptr, _marker: PhantomData }
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &'a str {
|
||||
pub fn name(&self) -> &str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr((*self.ptr).device_name).to_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn description(&self) -> &'a str {
|
||||
pub fn description(&self) -> &str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr((*self.ptr).device_description).to_bytes())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user