Skip to content

Commit

Permalink
chore: bump rust toolchain to 1.63 (MystenLabs#764)
Browse files Browse the repository at this point in the history
* chore: bump rust toolchain to 1.63

* fix: makes clippy happy

Fixes the beta build
  • Loading branch information
huitseeker authored Aug 15, 2022
1 parent d0b7d60 commit cc32685
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions narwhal/examples/src/demo_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use std::{
use tonic::Status;

pub mod narwhal {
#![allow(clippy::derive_partial_eq_without_eq)]
tonic::include_proto!("narwhal");
}

Expand Down
4 changes: 2 additions & 2 deletions narwhal/executor/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Subscriber {
.await
.map_err(|err| Error::permanent(PayloadRetrieveError(id, err.to_string())))?;

return match receiver
match receiver
.await
.map_err(|err| Error::permanent(PayloadRetrieveError(id, err.to_string())))?
{
Expand All @@ -165,7 +165,7 @@ impl Subscriber {
error!("Error while retrieving block via block waiter: {}", err);
Err(Error::transient(PayloadRetrieveError(id, err.to_string())))
}
};
}
}
};

Expand Down
4 changes: 2 additions & 2 deletions narwhal/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ async fn run(matches: &ArgMatches<'_>) -> Result<(), eyre::Report> {
analyze(rx_transaction_confirmation).await;

// Await on the completion handles of all the nodes we have launched
return task_manager.await.map_err(|err| match err {
task_manager.await.map_err(|err| match err {
task_group::RuntimeError::Panic { name: n, panic: p } => eyre!("{} paniced: {:?}", n, p),
task_group::RuntimeError::Application { name: n, error: e } => {
eyre!("{} error: {:?}", n, e)
}
});
})
}

/// Receives an ordered list of certificates and apply any application-specific logic.
Expand Down
9 changes: 2 additions & 7 deletions narwhal/types/src/metered_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ impl<T> Sender<T> {
/// Sends a value, waiting until there is capacity.
/// Increments the gauge in case of a successful `send`.
pub async fn send(&self, value: T) -> Result<(), SendError<T>> {
(*self)
.inner
.send(value)
.inspect(|_| self.gauge.inc())
.await
self.inner.send(value).inspect(|_| self.gauge.inc()).await
}

/// Completes when the receiver has dropped.
Expand All @@ -99,8 +95,7 @@ impl<T> Sender<T> {
/// Attempts to immediately send a message on this `Sender`
/// Increments the gauge in case of a successful `try_send`.
pub fn try_send(&self, message: T) -> Result<(), TrySendError<T>> {
(*self)
.inner
self.inner
.try_send(message)
// remove this unsightly hack once https://github.com/rust-lang/rust/issues/91345 is resolved
.map(|val| {
Expand Down
2 changes: 1 addition & 1 deletion narwhal/types/src/proto.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod narwhal {
#![cfg_attr(beta, allow(clippy::derive_partial_eq_without_eq))]
#![allow(clippy::derive_partial_eq_without_eq)]
tonic::include_proto!("narwhal");
}

Expand Down

0 comments on commit cc32685

Please sign in to comment.