From 20bf995c3be1eb5d0c156910ba219d10abdba20c Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 18 Jul 2024 11:14:24 +0200 Subject: [PATCH] Add Clone derive to flash Partition in embassy-embedded-hal --- embassy-embedded-hal/src/flash/partition/asynch.rs | 1 + embassy-embedded-hal/src/flash/partition/blocking.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/embassy-embedded-hal/src/flash/partition/asynch.rs b/embassy-embedded-hal/src/flash/partition/asynch.rs index 5920436dd..576e7e5b6 100644 --- a/embassy-embedded-hal/src/flash/partition/asynch.rs +++ b/embassy-embedded-hal/src/flash/partition/asynch.rs @@ -12,6 +12,7 @@ use super::Error; /// There is no guarantee that muliple partitions on the same flash /// operate on mutually exclusive ranges - such a separation is up to /// the user to guarantee. +#[derive(Clone)] pub struct Partition<'a, M: RawMutex, T: NorFlash> { flash: &'a Mutex, offset: u32, diff --git a/embassy-embedded-hal/src/flash/partition/blocking.rs b/embassy-embedded-hal/src/flash/partition/blocking.rs index 2ddbe3de0..478f39246 100644 --- a/embassy-embedded-hal/src/flash/partition/blocking.rs +++ b/embassy-embedded-hal/src/flash/partition/blocking.rs @@ -13,6 +13,7 @@ use super::Error; /// There is no guarantee that muliple partitions on the same flash /// operate on mutually exclusive ranges - such a separation is up to /// the user to guarantee. +#[derive(Clone)] pub struct BlockingPartition<'a, M: RawMutex, T: NorFlash> { flash: &'a Mutex>, offset: u32,