aboutsummaryrefslogtreecommitdiff
path: root/alacritty_config_derive
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-12-26 17:47:57 +0100
committerGitHub <noreply@github.com>2021-12-26 16:47:57 +0000
commitf0934d8440021b3762211d7cf0c26478dacee0dc (patch)
tree221ea3a4cbd4741950db9b29011c58f49e1ae27a /alacritty_config_derive
parent850fd1826b567c4c7cca66fd5ffe67c07ce6cc44 (diff)
downloadalacritty-f0934d8440021b3762211d7cf0c26478dacee0dc.tar.gz
alacritty-f0934d8440021b3762211d7cf0c26478dacee0dc.zip
Migrate to 2021 edition
Diffstat (limited to 'alacritty_config_derive')
-rw-r--r--alacritty_config_derive/Cargo.toml3
-rw-r--r--alacritty_config_derive/src/de_struct.rs2
-rw-r--r--alacritty_config_derive/tests/config.rs4
3 files changed, 5 insertions, 4 deletions
diff --git a/alacritty_config_derive/Cargo.toml b/alacritty_config_derive/Cargo.toml
index 8d6d9c4b..afc6b227 100644
--- a/alacritty_config_derive/Cargo.toml
+++ b/alacritty_config_derive/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Christian Duerr <contact@christianduerr.com>"]
license = "MIT/Apache-2.0"
description = "Failure resistant deserialization derive"
homepage = "https://github.com/alacritty/alacritty"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56.0"
[lib]
proc-macro = true
diff --git a/alacritty_config_derive/src/de_struct.rs b/alacritty_config_derive/src/de_struct.rs
index 1325cae3..ceb32fd9 100644
--- a/alacritty_config_derive/src/de_struct.rs
+++ b/alacritty_config_derive/src/de_struct.rs
@@ -185,7 +185,7 @@ struct Attr {
}
impl Parse for Attr {
- fn parse(input: ParseStream) -> parse::Result<Self> {
+ fn parse(input: ParseStream<'_>) -> parse::Result<Self> {
let ident = input.parse::<Ident>()?.to_string();
let param = input.parse::<Token![=]>().and_then(|_| input.parse()).ok();
Ok(Self { ident, param })
diff --git a/alacritty_config_derive/tests/config.rs b/alacritty_config_derive/tests/config.rs
index 6838a42e..58ad8bd4 100644
--- a/alacritty_config_derive/tests/config.rs
+++ b/alacritty_config_derive/tests/config.rs
@@ -131,7 +131,7 @@ struct Logger {
}
impl Log for Logger {
- fn log(&self, record: &Record) {
+ fn log(&self, record: &Record<'_>) {
assert_eq!(record.target(), env!("CARGO_PKG_NAME"));
match record.level() {
@@ -147,7 +147,7 @@ impl Log for Logger {
}
}
- fn enabled(&self, _metadata: &Metadata) -> bool {
+ fn enabled(&self, _metadata: &Metadata<'_>) -> bool {
true
}