From 91fd35e06f8ae24d66f6ba4598830d8dbc259c8a Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 19 Dec 2022 17:49:53 +0100 Subject: [PATCH] chore: upgrade to Rust edition 2021 and set MSRV (#130) The minimum supported Rust version is set to 1.60 due to the `parity-scale-codec` dependency. BREAKING CHANGE: Rust edition 2021 is now used --- Cargo.toml | 5 +++-- src/serde.rs | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7bce59f..5a56cb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,11 +7,12 @@ authors = ["Friedel Ziegelmayer "] keywords = ["ipld", "ipfs", "cid", "multihash", "multiformats"] license = "MIT" readme = "README.md" -edition = "2018" +edition = "2021" +rust-version = "1.60" [features] default = ["std", "multihash/default"] -std = ["multihash/std", "unsigned-varint/std", "alloc", "multibase/std"] +std = ["multihash/std", "unsigned-varint/std", "alloc", "multibase/std", "serde/std"] alloc = ["multibase", "multihash/alloc", "core2/alloc", "serde/alloc"] arb = ["quickcheck", "rand", "multihash/arb", "multihash/sha2", "arbitrary"] scale-codec = ["parity-scale-codec", "multihash/scale-codec"] diff --git a/src/serde.rs b/src/serde.rs index 2583e8f..0da91a5 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -108,8 +108,6 @@ impl<'de, const SIZE: usize> de::Deserialize<'de> for CidGeneric { #[cfg(test)] mod tests { - use std::convert::TryFrom; - use crate::CidGeneric; #[test]