diff options
| author | Max Audron <audron@cocaine.farm> | 2021-07-31 12:53:53 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-07-31 12:53:53 +0200 |
| commit | b218d85754ff1b1ad0fc0c2f70d88da162d5b47d (patch) | |
| tree | 5633f40b80792b2a1c21cf40e085622137347b76 | |
| parent | fix trailing semicolon match_variant macro (diff) | |
upgrade to rust 2021 editionrust-2021
Diffstat (limited to '')
| -rw-r--r-- | Cargo.toml | 4 | ||||
| -rw-r--r-- | derive/Cargo.toml | 4 | ||||
| -rw-r--r-- | src/util.rs | 1 |
3 files changed, 6 insertions, 3 deletions
@@ -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]); |
