Skip to content

Commit

Permalink
Fix use of unstable library feature 'is_some_with'
Browse files Browse the repository at this point in the history
  • Loading branch information
kkent030315 committed Oct 29, 2024
1 parent b3ea343 commit a66701e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pe/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a66701e

Please sign in to comment.