From 5cde4f36d810f8360369d89f0c6fee323c60a49d Mon Sep 17 00:00:00 2001 From: "T. Okubo" Date: Sat, 10 Mar 2018 14:03:51 +0900 Subject: [PATCH] Use String instead of Cow --- src/core.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core.rs b/src/core.rs index 92cfb12..5f39c3d 100644 --- a/src/core.rs +++ b/src/core.rs @@ -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() } }