Skip to content

Commit fd596ed

Browse files
committed
Switched from to_strbuf to into_owned
1 parent 977845a commit fd596ed

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/sdl2/audio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl AudioCVT {
354354
355355
unsafe {
356356
if (*self.raw).needed != 1 {
357-
return Err("no convertion needed!".to_strbuf())
357+
return Err("no convertion needed!".into_owned())
358358
}
359359
// set len
360360
(*self.raw).len = src.len() as c_int;

src/sdl2/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ pub fn push_event(event: Event) -> SdlResult<()> {
11421142
else { Err(get_error()) }
11431143
},
11441144
None => {
1145-
Err("Unsupport event type to push back to queue.".to_strbuf())
1145+
Err("Unsupport event type to push back to queue.".into_owned())
11461146
}
11471147
}
11481148
}

src/sdl2/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ impl Texture {
733733
if result {
734734
Ok((texw as f64, texh as f64))
735735
} else {
736-
Err("Operation not supported".to_strbuf())
736+
Err("Operation not supported".into_owned())
737737
}
738738
}
739739

src/sdl2/sdl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub fn was_inited(flags: InitFlag) -> InitFlag {
115115
pub fn get_error() -> String {
116116
unsafe {
117117
let cstr = CString::new(ll::SDL_GetError(), false);
118-
cstr.as_str().unwrap().to_strbuf()
118+
cstr.as_str().unwrap().into_owned()
119119
}
120120
}
121121

src/sdl2/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn get_version() -> Version {
6161
pub fn get_revision() -> String {
6262
unsafe {
6363
let ret = ll::SDL_GetRevision();
64-
CString::new(ret, false).as_str().unwrap().to_strbuf()
64+
CString::new(ret, false).as_str().unwrap().into_owned()
6565
}
6666
}
6767

0 commit comments

Comments
 (0)