Skip to content

Commit 8ff4ae3

Browse files
committed
clippy
1 parent 6bce900 commit 8ff4ae3

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

sled-agent/config-reconciler/src/handle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl AvailableDatasetsReceiver {
475475
AvailableDatasetsReceiverInner::FakeStatic(pools) => pools
476476
.iter()
477477
.map(|(pool, path)| PathInPool {
478-
pool: ZpoolOrRamdisk::Zpool(pool.clone()),
478+
pool: ZpoolOrRamdisk::Zpool(*pool),
479479
path: path.join(U2_DEBUG_DATASET),
480480
})
481481
.collect(),
@@ -498,7 +498,7 @@ impl AvailableDatasetsReceiver {
498498
AvailableDatasetsReceiverInner::FakeStatic(pools) => pools
499499
.iter()
500500
.map(|(pool, path)| PathInPool {
501-
pool: ZpoolOrRamdisk::Zpool(pool.clone()),
501+
pool: ZpoolOrRamdisk::Zpool(*pool),
502502
path: path.join(ZONE_DATASET),
503503
})
504504
.collect(),

sled-agent/config-reconciler/src/internal_disks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ impl InternalDisks {
325325
&self.mount_config
326326
}
327327

328-
pub fn boot_disk_zpool(&self) -> Option<&ZpoolName> {
328+
pub fn boot_disk_zpool(&self) -> Option<ZpoolName> {
329329
self.disks.iter().find_map(|d| {
330-
if d.is_boot_disk() { Some(&d.zpool_name) } else { None }
330+
if d.is_boot_disk() { Some(d.zpool_name) } else { None }
331331
})
332332
}
333333

sled-agent/src/services.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,9 @@ impl ServiceManager {
848848
/// - `sidecar_revision`: Rev of attached sidecar, if present.
849849
/// - `switch_zone_maghemite_links`: List of physical links on which
850850
/// maghemite should listen.
851+
/// - `zone_image_resolver`: how to find Omicron zone images
851852
/// - `internal_disks_rx`: watch channel for changes to internal disks
853+
#[allow(clippy::too_many_arguments)]
852854
pub(crate) fn new(
853855
log: &Logger,
854856
ddm_reconciler: DdmReconciler,

sled-agent/src/sled_agent.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,7 @@ impl SledAgent {
428428
.internal_disks_rx()
429429
.current()
430430
.boot_disk_zpool()
431-
.ok_or_else(|| Error::BootDiskNotFound)?
432-
.clone();
431+
.ok_or_else(|| Error::BootDiskNotFound)?;
433432

434433
// Configure a swap device of the configured size before other system setup.
435434
match config.swap_device_size_gb {

0 commit comments

Comments
 (0)