From a66701eab9547c754f1d99268a11128db9fd8d53 Mon Sep 17 00:00:00 2001 From: kkent030315 Date: Tue, 29 Oct 2024 18:33:31 +0900 Subject: [PATCH] Fix use of unstable library feature 'is_some_with' --- src/pe/tls.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pe/tls.rs b/src/pe/tls.rs index 46bd2546..c0ab274b 100644 --- a/src/pe/tls.rs +++ b/src/pe/tls.rs @@ -335,7 +335,14 @@ mod tests { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]; - assert_eq!(tls_data.raw_data.is_some_and(|x| x.len() == 0x50), true); + assert_eq!( + tls_data + .raw_data + .as_ref() + .map(|x| x.len() == 0x50) + .unwrap_or(false), + true + ); assert_eq!(tls_data.raw_data, Some(raw_data_expect)); assert_eq!(dir.start_address_of_raw_data, 0x14001E000); assert_eq!(dir.end_address_of_raw_data, 0x14001E050);