Migrate to 2018 edition. (#924)
* Migrate to 2018 edition. * Use impl Iterator at one site. * Fix more rust 2018 idioms.
This commit is contained in:
parent
2e0bbc091f
commit
f879bca21c
71 changed files with 411 additions and 436 deletions
|
|
@ -15,7 +15,7 @@ mod window_delegate;
|
|||
|
||||
use std::{fmt, ops::Deref, sync::Arc};
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
event::DeviceId as RootDeviceId, window::WindowAttributes,
|
||||
error::OsError as RootOsError,
|
||||
};
|
||||
|
|
@ -74,7 +74,7 @@ impl Window {
|
|||
}
|
||||
|
||||
impl fmt::Display for OsError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
OsError::CGError(e) => f.pad(&format!("CGError {}", e)),
|
||||
OsError::CreationError(e) => f.pad(e),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue