mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31: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 {
|
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",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue