Skip to content

Commit

Permalink
fix: fixes cargo check (#4729)
Browse files Browse the repository at this point in the history
Description
---
Fixes cargo checks

Motivation and Context
---
Errors and warns here: https://github.com/tari-project/tari/actions/runs/3111073864/jobs/5042950759

How Has This Been Tested?
---
CI passes
  • Loading branch information
sdbondi authored Sep 26, 2022
1 parent f55762e commit 851ba1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion base_layer/tari_mining_helper_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub unsafe extern "C" fn byte_vector_create(
#[no_mangle]
pub unsafe extern "C" fn byte_vector_destroy(bytes: *mut ByteVector) {
if !bytes.is_null() {
Box::from_raw(bytes);
drop(Box::from_raw(bytes));
}
}

Expand Down
7 changes: 0 additions & 7 deletions comms/core/src/connection_manager/requester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ impl ConnectionManagerRequester {
Ok(())
}

/// Send instruction to ConnectionManager to dial a peer without waiting for a result.
#[tracing::instrument(level = "trace", skip(self))]
pub(crate) async fn send_dial_peer_no_reply(&mut self, node_id: NodeId) -> Result<(), ConnectionManagerError> {
self.send_dial_peer(node_id, None).await?;
Ok(())
}

/// Return the ListenerInfo for the configured listener once the listener(s) are bound to the socket.
///
/// This is useful when using "assigned port" addresses, such as /ip4/0.0.0.0/tcp/0 or /memory/0 for listening and
Expand Down
4 changes: 2 additions & 2 deletions comms/core/src/protocol/rpc/server/chunking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl ChunkedResponseIter {
&self.message.payload
}

fn next_chunk(&mut self) -> Option<Bytes> {
fn get_next_chunk(&mut self) -> Option<Bytes> {
let len = self.payload().len();
if len == 0 {
if self.num_chunks > 1 {
Expand Down Expand Up @@ -171,7 +171,7 @@ impl Iterator for ChunkedResponseIter {
}

let request_id = self.message.request_id;
let chunk = self.next_chunk()?;
let chunk = self.get_next_chunk()?;

// status MUST be set for the first chunked message, all subsequent chunk messages MUST have a status of 0
let mut status = 0;
Expand Down
2 changes: 1 addition & 1 deletion comms/dht/src/store_forward/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub enum StoreAndForwardError {
RequestMessagesFailed(DhtOutboundError),
#[error("Received SAF messages that were not requested")]
ReceivedUnrequestedSafMessages,
#[error("SAF messages received from peer {peer} after deadline. Received after {0:.2?}")]
#[error("SAF messages received from peer {peer} after deadline. Received after {message_age:.2?}")]
SafMessagesReceivedAfterDeadline { peer: NodeId, message_age: Duration },
#[error("Invalid SAF request: `stored_at` cannot be in the future")]
StoredAtWasInFuture,
Expand Down

0 comments on commit 851ba1d

Please sign in to comment.