From accf2f3cc3b0ac11881ec8f1e225e28a8e07055d Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 21 Feb 2015 18:07:35 -0500 Subject: Deref before matching rust-guidelines encourages this --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 3798ffd..54f4b16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,9 +84,9 @@ pub enum CreationError { impl CreationError { fn to_string(&self) -> &str { - match self { - &CreationError::OsError(ref text) => text.as_slice(), - &CreationError::NotSupported => "Some of the requested attributes are not supported", + match *self { + CreationError::OsError(ref text) => text.as_slice(), + CreationError::NotSupported => "Some of the requested attributes are not supported", } } } -- cgit v1.2.3 From f4c9bd81bbebb0081271d5ebc763fc1aba9dad0a Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 21 Feb 2015 18:12:32 -0500 Subject: Opt into features to silence warnings --- build.rs | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/build.rs b/build.rs index a151502..b2813e0 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,5 @@ #![allow(unstable)] +#![feature(old_io,old_path,os)] extern crate gl_generator; extern crate khronos_api; diff --git a/src/lib.rs b/src/lib.rs index 54f4b16..e7d7b68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor,core,std_misc)] #![unstable] #![allow(unstable)] -- cgit v1.2.3 From 7fa19ab0dfd0624386ae1086ad1d740072d7f1a4 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 21 Feb 2015 18:19:03 -0500 Subject: Remove deprecated 'allow' lint --- build.rs | 1 - src/lib.rs | 1 - 2 files changed, 2 deletions(-) (limited to 'src/lib.rs') diff --git a/build.rs b/build.rs index b2813e0..6088615 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,3 @@ -#![allow(unstable)] #![feature(old_io,old_path,os)] extern crate gl_generator; extern crate khronos_api; diff --git a/src/lib.rs b/src/lib.rs index e7d7b68..4ab577a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![feature(unsafe_destructor,core,std_misc)] #![unstable] -#![allow(unstable)] //! The purpose of this library is to provide an OpenGL context on as many //! platforms as possible. -- cgit v1.2.3