Upgrade to Rust 1.17.
- Remove some uses of 'static in const and static globals that are no longer needed. - Use the new struct initialization shorthand.
This commit is contained in:
@@ -55,7 +55,7 @@ pub struct LocatedToken<'a> {
|
||||
/// Wrap up a `Token` with the given location.
|
||||
fn token<'a>(token: Token<'a>, loc: Location) -> Result<LocatedToken<'a>, LocatedError> {
|
||||
Ok(LocatedToken {
|
||||
token: token,
|
||||
token,
|
||||
location: loc,
|
||||
})
|
||||
}
|
||||
@@ -76,7 +76,7 @@ pub struct LocatedError {
|
||||
/// Wrap up an `Error` with the given location.
|
||||
fn error<'a>(error: Error, loc: Location) -> Result<LocatedToken<'a>, LocatedError> {
|
||||
Err(LocatedError {
|
||||
error: error,
|
||||
error,
|
||||
location: loc,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user