Skip to content

Commit

Permalink
placate clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jul 30, 2024
1 parent a97fff1 commit 71b0ed0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions sled-agent/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ impl Instance {
/// * `services`: A set of instance manager-provided services.
/// * `sled_identifiers`: Sled-related metadata used to track statistics.
/// * `metadata`: Instance-related metadata used to track statistics.
#[allow(clippy::too_many_arguments)]
pub(crate) fn new(
log: Logger,
id: InstanceUuid,
Expand Down
11 changes: 8 additions & 3 deletions sled-agent/src/instance_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl InstanceManager {
instance_runtime,
vmm_runtime,
propolis_addr,
sled_identifiers,
sled_identifiers: Box::new(sled_identifiers),
metadata,
tx,
})
Expand Down Expand Up @@ -345,7 +345,12 @@ enum InstanceManagerRequest {
instance_runtime: InstanceRuntimeState,
vmm_runtime: VmmRuntimeState,
propolis_addr: SocketAddr,
sled_identifiers: SledIdentifiers,
// These are boxed because they are, apparently, quite large, and Clippy
// whinges about the overall size of this variant relative to the
// others. Since we will generally send `EnsureRegistered` requests much
// less frequently than most of the others, boxing this seems like a
// reasonable choice...
sled_identifiers: Box<SledIdentifiers>,
metadata: InstanceMetadata,
tx: oneshot::Sender<Result<SledInstanceState, Error>>,
},
Expand Down Expand Up @@ -475,7 +480,7 @@ impl InstanceManagerRunner {
instance_runtime,
vmm_runtime,
propolis_addr,
sled_identifiers,
*sled_identifiers,
metadata
).await).map_err(|_| Error::FailedSendClientClosed)
},
Expand Down

0 comments on commit 71b0ed0

Please sign in to comment.