Switched from to_strbuf to into_owned

This commit is contained in:
Vladimir Matveev
2014-05-26 20:06:45 +04:00
parent 977845acfd
commit fd596ed90b
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ impl AudioCVT {
unsafe {
if (*self.raw).needed != 1 {
return Err("no convertion needed!".to_strbuf())
return Err("no convertion needed!".into_owned())
}
// set len
(*self.raw).len = src.len() as c_int;
+1 -1
View File
@@ -1142,7 +1142,7 @@ pub fn push_event(event: Event) -> SdlResult<()> {
else { Err(get_error()) }
},
None => {
Err("Unsupport event type to push back to queue.".to_strbuf())
Err("Unsupport event type to push back to queue.".into_owned())
}
}
}
+1 -1
View File
@@ -733,7 +733,7 @@ impl Texture {
if result {
Ok((texw as f64, texh as f64))
} else {
Err("Operation not supported".to_strbuf())
Err("Operation not supported".into_owned())
}
}
+1 -1
View File
@@ -115,7 +115,7 @@ pub fn was_inited(flags: InitFlag) -> InitFlag {
pub fn get_error() -> String {
unsafe {
let cstr = CString::new(ll::SDL_GetError(), false);
cstr.as_str().unwrap().to_strbuf()
cstr.as_str().unwrap().into_owned()
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ pub fn get_version() -> Version {
pub fn get_revision() -> String {
unsafe {
let ret = ll::SDL_GetRevision();
CString::new(ret, false).as_str().unwrap().to_strbuf()
CString::new(ret, false).as_str().unwrap().into_owned()
}
}