Skip to content

Commit

Permalink
chore: update codebase to latest Rust version (1.71)
Browse files Browse the repository at this point in the history
  • Loading branch information
aesedepece committed Jul 27, 2023
1 parent 21a2229 commit 081dac6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions data_structures/src/chain/tapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl TapiEngine {
}
}
for n in 0..self.bit_tapi_counter.len() {
if let Some(mut bit_counter) = self.bit_tapi_counter.get_mut(n, &epoch_to_update) {
if let Some(bit_counter) = self.bit_tapi_counter.get_mut(n, &epoch_to_update) {
if !self.wip_activation.contains_key(&bit_counter.wip)
&& !avoid_wip_list.contains(&bit_counter.wip)
{
Expand Down Expand Up @@ -639,7 +639,7 @@ mod tests {
assert_eq!(tapi_counter.current_length, 1);

assert_eq!(tapi_counter.get(0, &100).unwrap().votes, 0);
let mut votes_counter = tapi_counter.get_mut(0, &100).unwrap();
let votes_counter = tapi_counter.get_mut(0, &100).unwrap();
votes_counter.votes += 1;
assert_eq!(tapi_counter.get(0, &100).unwrap().votes, 1);

Expand Down
2 changes: 1 addition & 1 deletion node/src/actors/inventory_manager/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ mod tests {
// Start relevant actors
config_mngr::start(config);
storage_mngr::start();
let inventory_manager = InventoryManager::default().start();
let inventory_manager = InventoryManager.start();

// Create first block with value transfer transactions
let block = build_block_with_vt_transactions(1);
Expand Down
4 changes: 2 additions & 2 deletions node/src/actors/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn run(config: Arc<Config>, ops: NodeOps, callback: fn()) -> Result<(), fail
SystemRegistry::set(peers_manager_addr);

// Start ConnectionsManager actor
let connections_manager_addr = ConnectionsManager::default().start();
let connections_manager_addr = ConnectionsManager.start();
SystemRegistry::set(connections_manager_addr);

// Start SessionManager actor
Expand All @@ -69,7 +69,7 @@ pub fn run(config: Arc<Config>, ops: NodeOps, callback: fn()) -> Result<(), fail
SystemRegistry::set(chain_manager_addr);

// Start InventoryManager actor
let inventory_manager_addr = InventoryManager::default().start();
let inventory_manager_addr = InventoryManager.start();
SystemRegistry::set(inventory_manager_addr);

// Start RadManager actor
Expand Down
2 changes: 1 addition & 1 deletion partial_struct/tests/partial_struct_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ fn test_partial_attr_partial() {

let p = PartialObj::default();

assert_eq!(p.f, PartialAnotherObj::default());
assert_eq!(p.f, PartialAnotherObj);
}
2 changes: 1 addition & 1 deletion wallet/src/actors/app/handlers/refresh_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Handler<RefreshSessionRequest> for app::App {
type Result = <RefreshSessionRequest as Message>::Result;

fn handle(&mut self, msg: RefreshSessionRequest, ctx: &mut Self::Context) -> Self::Result {
let mut session = self
let session = self
.state
.sessions
.get_mut(&msg.session_id)
Expand Down
2 changes: 1 addition & 1 deletion wallet/src/repository/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ where
let mut state = self.state.write()?;
// This line is needed because of this error:
// - Cannot borrow `state` as mutable because it is also borrowed as immutable
let mut state = &mut *state;
let state = &mut *state;

// Mark UTXOs as used so we don't double spend
// Save the timestamp to after which the UTXO can be spent again
Expand Down

0 comments on commit 081dac6

Please sign in to comment.