mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
use cloned rather than a map that clones
This commit is contained in:
parent
1132bc2383
commit
e13d844f1f
|
@ -243,7 +243,7 @@ static CHIP_INFO: InitOnce<&'static ChipInfo> = InitOnce::new();
|
||||||
fn cached_chip_info() -> Result<&'static ChipInfo, Error> {
|
fn cached_chip_info() -> Result<&'static ChipInfo, Error> {
|
||||||
CHIP_INFO
|
CHIP_INFO
|
||||||
.try_get(|| -> Result<_, Error> { Ok(FlashChipType::detect()?.chip_info()) })
|
.try_get(|| -> Result<_, Error> { Ok(FlashChipType::detect()?.chip_info()) })
|
||||||
.map(Clone::clone)
|
.cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Actual implementation of the ChipInfo functions.
|
/// Actual implementation of the ChipInfo functions.
|
||||||
|
|
Loading…
Reference in a new issue