Use String instead of Cow<str>

merge-requests/7/merge
T. Okubo 2018-03-10 14:03:51 +09:00
parent 8720144735
commit 5cde4f36d8
1 changed files with 4 additions and 4 deletions

View File

@ -11,16 +11,16 @@ use ::libc::{c_void, c_char, c_int};
use ::enums::*;
/// Retrieve libvlc version.
pub fn version() -> Cow<'static, str> {
pub fn version() -> String {
unsafe{
from_cstr_ref(sys::libvlc_get_version()).unwrap()
from_cstr_ref(sys::libvlc_get_version()).unwrap().into_owned()
}
}
/// Retrieve libvlc compiler version.
pub fn compiler() -> Cow<'static, str> {
pub fn compiler() -> String {
unsafe{
from_cstr_ref(sys::libvlc_get_compiler()).unwrap()
from_cstr_ref(sys::libvlc_get_compiler()).unwrap().into_owned()
}
}