Update for rustc

This commit is contained in:
Pierre Krieger 2015-02-19 21:22:07 +01:00
parent c82d978c59
commit 0fa579d885
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "cpal"
version = "0.0.13"
version = "0.0.14"
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Cross-platform audio playing library in pure Rust."
repository = "https://github.com/tomaka/cpal"

View File

@ -140,7 +140,7 @@ impl Drop for Voice {
impl<'a, T> Buffer<'a, T> {
pub fn get_buffer<'b>(&'b mut self) -> &'b mut [T] {
unsafe {
slice::from_raw_mut_buf(&self.buffer_data, self.buffer_len)
slice::from_raw_parts_mut(self.buffer_data, self.buffer_len)
}
}
@ -264,7 +264,7 @@ fn init() -> Result<Voice, String> {
fn check_result(result: winapi::HRESULT) -> Result<(), String> {
if result < 0 {
return Err(::std::os::error_string(result as usize)); // TODO:
return Err(::std::os::error_string(result)); // TODO:
}
Ok(())