mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Deref before matching
rust-guidelines encourages this
This commit is contained in:
parent
424dbb29ed
commit
accf2f3cc3
|
@ -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",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue