From 537524114573ff72fde90e202c06c6f732283302 Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Thu, 13 Jan 2022 16:17:40 -0800 Subject: [PATCH 1/2] Upgrade to edition 2021 --- Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22b7484..4ddcd22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,7 @@ keywords = [ "no_std" ] categories = ["cryptography"] include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] license = "MIT/Apache-2.0" -edition = "2018" -resolver = "2" +edition = "2021" [dependencies] rand = { version = "0.8", default-features = false, features = ["std_rng"]} From a845e501dd1231abd1446409382d0548d075352f Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Thu, 13 Jan 2022 16:24:14 -0800 Subject: [PATCH 2/2] Upgrade CI and fix formatting --- .github/workflows/ci.yml | 2 +- src/io/mod.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81d3385..3ac6b98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Install Rust uses: actions-rs/toolchain@v1 with: diff --git a/src/io/mod.rs b/src/io/mod.rs index 9d8c22b..cd38cbc 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -109,8 +109,8 @@ pub trait Read { Ok(n) => { let tmp = buf; buf = &mut tmp[n..]; - } - Err(ref e) if e.kind() == ErrorKind::Interrupted => {} + }, + Err(ref e) if e.kind() == ErrorKind::Interrupted => {}, Err(e) => return Err(e), } } @@ -204,9 +204,9 @@ pub trait Write { ErrorKind::WriteZero, "failed to write whole buffer", )) - } + }, Ok(n) => buf = &buf[n..], - Err(ref e) if e.kind() == ErrorKind::Interrupted => {} + Err(ref e) if e.kind() == ErrorKind::Interrupted => {}, Err(e) => return Err(e), } }