mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
codec/codec: use lifetime elision
This commit is contained in:
+2
-2
@@ -35,13 +35,13 @@ impl<'a> Codec<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn name(&'a self) -> &'a str {
|
||||
pub fn name(&self) -> &str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr((*self.ptr).name).to_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn description(&'a self) -> &'a str {
|
||||
pub fn description(&self) -> &str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr((*self.ptr).long_name).to_bytes())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user