mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 08:56:58 -06:00
Make Target copy-able
Clippy also informed us that we can drop some of the clone calls. ``` ❯ cargo clippy Checking veilid-core v0.2.5 (~/Developer/veilid/veilid-core) error: using `clone` on type `Target` which implements the `Copy` trait --> veilid-core/src/storage_manager/record_store.rs:912:33 | 912 | target: w.target.clone(), | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `w.target` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy note: the lint level is defined here --> veilid-core/src/lib.rs:25:9 | 25 | #![deny(clippy::all)] | ^^^^^^^^^^^ = note: `#[deny(clippy::clone_on_copy)]` implied by `#[deny(clippy::all)]` error: using `clone` on type `Target` which implements the `Copy` trait --> veilid-core/src/storage_manager/watch_value.rs:199:21 | 199 | target.clone(), | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `target` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy error: using `clone` on type `Target` which implements the `Copy` trait --> veilid-core/src/storage_manager/mod.rs:737:17 | 737 | vc.target.clone(), | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `vc.target` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy error: could not compile `veilid-core` (lib) due to 3 previous errors ```
This commit is contained in:
parent
9f795ef520
commit
5e55be4b7a
@ -734,7 +734,7 @@ impl StorageManager {
|
|||||||
|
|
||||||
let dest = rpc_processor
|
let dest = rpc_processor
|
||||||
.resolve_target_to_destination(
|
.resolve_target_to_destination(
|
||||||
vc.target.clone(),
|
vc.target,
|
||||||
SafetySelection::Unsafe(Sequencing::NoPreference),
|
SafetySelection::Unsafe(Sequencing::NoPreference),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
@ -909,7 +909,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
evcis.push(EarlyValueChangedInfo {
|
evcis.push(EarlyValueChangedInfo {
|
||||||
target: w.target.clone(),
|
target: w.target,
|
||||||
key: rtk.key,
|
key: rtk.key,
|
||||||
subkeys,
|
subkeys,
|
||||||
count,
|
count,
|
||||||
|
@ -196,7 +196,7 @@ impl StorageManager {
|
|||||||
subkeys.clone(),
|
subkeys.clone(),
|
||||||
expiration,
|
expiration,
|
||||||
count,
|
count,
|
||||||
target.clone(),
|
target,
|
||||||
watcher,
|
watcher,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
@ -3,7 +3,7 @@ use super::*;
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/// Valid destinations for a message sent over a routing context
|
/// Valid destinations for a message sent over a routing context
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq, Hash, Copy, PartialOrd, Ord)]
|
||||||
pub enum Target {
|
pub enum Target {
|
||||||
/// Node by its public key
|
/// Node by its public key
|
||||||
NodeId(TypedKey),
|
NodeId(TypedKey),
|
||||||
|
Loading…
Reference in New Issue
Block a user