mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Deref before matching
rust-guidelines encourages this
This commit is contained in:
@@ -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",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user