Rustify core/src/core (#1122)
Small refactoring of one folder, if it makes sense I could extend the scope. * Remove some cloning (real and just verbosity in the code) * Naming conventions like to/into* * Some Clippy's suggestions I found that we don't use field init shorthand syntax, so I didn't touch this part, was it discussed before?
This commit is contained in:
@@ -61,7 +61,7 @@ fn peer_handshake() {
|
||||
p2p_config.clone(),
|
||||
dandelion_config.clone(),
|
||||
net_adapter.clone(),
|
||||
Hash::from_vec(vec![]),
|
||||
Hash::from_vec(&vec![]),
|
||||
Arc::new(AtomicBool::new(false)),
|
||||
false,
|
||||
None,
|
||||
@@ -82,7 +82,7 @@ fn peer_handshake() {
|
||||
p2p::Capabilities::UNKNOWN,
|
||||
Difficulty::one(),
|
||||
my_addr,
|
||||
&p2p::handshake::Handshake::new(Hash::from_vec(vec![]), p2p_config.clone()),
|
||||
&p2p::handshake::Handshake::new(Hash::from_vec(&vec![]), p2p_config.clone()),
|
||||
net_adapter,
|
||||
).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user