aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2015-01-23 18:50:06 -0700
committerAndrew Kelley <superjoe30@gmail.com>2015-01-23 19:18:22 -0700
commit02a57e04225b8e64bc0e853fe5540d48b7ae0b6c (patch)
tree62acc844e7392ddb42242ab8fec94858981cb13c /src/x11/window
parentbd3d7513f8a8b8c58f0f0952027f7dd1f6883f59 (diff)
downloadglutin-02a57e04225b8e64bc0e853fe5540d48b7ae0b6c.tar.gz
glutin-02a57e04225b8e64bc0e853fe5540d48b7ae0b6c.zip
fix for latest rustc
Diffstat (limited to 'src/x11/window')
-rw-r--r--src/x11/window/mod.rs3
1 files changed, 1 insertions, 2 deletions
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() {