From b218d85754ff1b1ad0fc0c2f70d88da162d5b47d Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 31 Jul 2021 12:53:53 +0200 Subject: upgrade to rust 2021 edition --- Cargo.toml | 4 +++- derive/Cargo.toml | 4 +++- src/util.rs | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 520b917..b23119b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,5 @@ +cargo-features = ["edition2021"] + [package] name = "libquassel" description = "Native rust implementation of the Quassel protocol and library functions" @@ -6,7 +8,7 @@ authors = ["Max Audron "] license = "ISC" homepage = "https://gitlab.com/cocainefarm/libquassel" repository = "https://gitlab.com/cocainefarm/libquassel" -edition = "2018" +edition = "2021" autobins = true include = ["src/**/*", "LICENSE", "README.md"] diff --git a/derive/Cargo.toml b/derive/Cargo.toml index bc4ed2f..c013b0c 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,8 +1,10 @@ +cargo-features = ["edition2021"] + [package] name = "libquassel-derive" version = "0.1.0" authors = ["Max Audron "] -edition = "2018" +edition = "2021" [lib] proc-macro = true diff --git a/src/util.rs b/src/util.rs index 581340d..6eb4781 100644 --- a/src/util.rs +++ b/src/util.rs @@ -22,7 +22,6 @@ macro_rules! match_variant { /// Prepend the length of `buf` to `buf` pub fn prepend_byte_len(buf: &mut Vec) { - use std::convert::TryInto; let len: i32 = buf.len().try_into().unwrap(); let ulen: &[u8] = &len.to_be_bytes(); buf.insert(0, ulen[3]); -- cgit v1.2.3