codec/codec: use lifetime elision
This commit is contained in:
parent
2f4ca56e46
commit
5436f264a9
@ -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())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user