mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 14:50:04 -04:00
Deref before matching
rust-guidelines encourages this
This commit is contained in:
@@ -84,9 +84,9 @@ pub enum CreationError {
|
|||||||
|
|
||||||
impl CreationError {
|
impl CreationError {
|
||||||
fn to_string(&self) -> &str {
|
fn to_string(&self) -> &str {
|
||||||
match self {
|
match *self {
|
||||||
&CreationError::OsError(ref text) => text.as_slice(),
|
CreationError::OsError(ref text) => text.as_slice(),
|
||||||
&CreationError::NotSupported => "Some of the requested attributes are not supported",
|
CreationError::NotSupported => "Some of the requested attributes are not supported",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user