Skip to content

Commit

Permalink
Merge pull request #23 from tari-project/update-toolchain
Browse files Browse the repository at this point in the history
chore: update toolchain
  • Loading branch information
CjS77 committed Dec 14, 2022
2 parents 7ac2860 + 9f201bb commit b7f00f2
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Disabling this for now, since it always fails, and not sure it's compatible with criterion
name: Benchmark
on:
pull_request:
push:
branches:
- main
- mb-*
- bm-*

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clippy-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push, pull_request]
on: [pull_request]
name: Clippy
jobs:
clippy_check:
Expand All @@ -8,7 +8,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
toolchain: nightly-2022-01-17
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
rust:
- stable
- nightly-2022-01-17
- nightly-2022-12-10
steps:
- name: checkout
uses: actions/checkout@v2
Expand All @@ -34,17 +34,13 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
# TODO: re-add all features once https://github.com/rust-lang/packed_simd/pull/341 is used by dalek
# args: --all-features
args: --features u64_backend
args: --all-features
- name: test/release all features
if: ${{ matrix.rust != 'stable' }}
uses: actions-rs/cargo@v1
with:
command: test
# TODO: re-add all features once https://github.com/rust-lang/packed_simd/pull/341 is used by dalek
# args: --release --all-features
args: --features u64_backend
args: --release --all-features
- name: docs build
uses: actions-rs/cargo@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ digest = { version = "0.9.0", default-features = false }
lazy_static = "1.4.0"
merlin = { version = "3", default-features = false }
rand = "0.7"
serde = "1.0.89"
# Note: toolchain must be at v1.60+ to support serde v1.0.150+
serde = "1.0.150"
sha3 = { version = "0.9.1", default-features = false }
thiserror = { version = "1" }
zeroize = "1"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2022-01-17"
channel = "stable"
2 changes: 0 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ normalize_comments = true
reorder_imports = true
reorder_modules = true
reorder_impl_items = true
report_todo = "Never"
report_fixme = "Never"
space_after_colon = true
space_before_colon = false
struct_lit_single_line = true
Expand Down
5 changes: 3 additions & 2 deletions src/inner_product_round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ where
self.a1 = Some(a1.clone());
self.b = Some(b.clone());

let e = transcripts::transcript_points_a1_b_challenge_e(*self.transcript, &a1.compress(), &b.compress())?;
let e =
transcripts::transcript_points_a1_b_challenge_e(&mut self.transcript, &a1.compress(), &b.compress())?;

self.r1 = Some(r + self.ai[0] * e);
self.s1 = Some(s + self.bi[0] * e);
Expand Down Expand Up @@ -237,7 +238,7 @@ where
self.ri.push(P::vartime_multiscalar_mul(ri_scalars, ri_points));

let e = transcripts::transcript_points_l_r_challenge_e(
*self.transcript,
&mut self.transcript,
&self.li[self.li.len() - 1].compress(),
&self.ri[self.ri.len() - 1].compress(),
)?;
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/curve_point_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub trait CurvePointProtocol:
// instead of below
let mut buffer = [0u8; 64];
let size = min(output.len(), 64);
(&mut buffer[0..size]).copy_from_slice(&output.as_slice()[0..size]);
(buffer[0..size]).copy_from_slice(&output.as_slice()[0..size]);
Self::from_uniform_bytes(&buffer)
}

Expand Down
4 changes: 2 additions & 2 deletions src/utils/non_debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

use std::fmt;

use derive_more::{Deref, DerefMut, From};
use derive_more::{AsMut, AsRef, Deref, DerefMut, From};

/// A struct to add 'Debug' functionality to other struct members that do not implement 'Debug'
#[derive(Copy, Clone, From, Deref, DerefMut)]
#[derive(Copy, Clone, From, Deref, DerefMut, AsRef, AsMut)]
pub struct NonDebug<T> {
inner: T,
}
Expand Down

0 comments on commit b7f00f2

Please sign in to comment.