From 02a57e04225b8e64bc0e853fe5540d48b7ae0b6c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 23 Jan 2015 18:50:06 -0700 Subject: fix for latest rustc --- src/x11/window/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/x11/window/mod.rs') diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index f4c296a..b89e34c 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -519,8 +519,7 @@ impl Window { mem::transmute(buffer.as_mut_ptr()), buffer.len() as libc::c_int, ptr::null_mut(), ptr::null_mut()); - str::from_utf8(buffer.as_slice().slice_to(count as usize)) - .unwrap_or("").to_string() + str::from_utf8(&buffer.as_slice()[..count as usize]).unwrap_or("").to_string() }; for chr in written.as_slice().chars() { -- cgit v1.2.3