aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-07-31 12:53:53 +0200
committerMax Audron <audron@cocaine.farm>2021-07-31 12:53:53 +0200
commitb218d85754ff1b1ad0fc0c2f70d88da162d5b47d (patch)
tree5633f40b80792b2a1c21cf40e085622137347b76
parentfix trailing semicolon match_variant macro (diff)
upgrade to rust 2021 editionrust-2021
-rw-r--r--Cargo.toml4
-rw-r--r--derive/Cargo.toml4
-rw-r--r--src/util.rs1
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 <audron@cocaine.farm>"]
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 <audron@cocaine.farm>"]
-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<u8>) {
- use std::convert::TryInto;
let len: i32 = buf.len().try_into().unwrap();
let ulen: &[u8] = &len.to_be_bytes();
buf.insert(0, ulen[3]);