aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-24 07:57:01 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-24 07:57:01 +0100
commitaa9262506400aee9f16efabd015e79cc116079d7 (patch)
tree62acc844e7392ddb42242ab8fec94858981cb13c /src/x11
parentbd3d7513f8a8b8c58f0f0952027f7dd1f6883f59 (diff)
parent02a57e04225b8e64bc0e853fe5540d48b7ae0b6c (diff)
downloadglutin-aa9262506400aee9f16efabd015e79cc116079d7.tar.gz
glutin-aa9262506400aee9f16efabd015e79cc116079d7.zip
Merge pull request #224 from andrewrk/fix-error-trait
fix for latest rustc
Diffstat (limited to 'src/x11')
-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() {