From c92c64236ef5f38800e7dd243b1e485820f816d2 Mon Sep 17 00:00:00 2001 From: TKF Date: Sun, 4 Aug 2024 20:37:14 +0800 Subject: [PATCH] Fix typos --- src/set.rs | 2 +- src/tests.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/set.rs b/src/set.rs index 6562620..5f4979c 100644 --- a/src/set.rs +++ b/src/set.rs @@ -181,7 +181,7 @@ impl> MemorySet { /// /// `update_flags` is a function that receives old flags and processes /// new flags (e.g., some flags can not be changed through this interface). - /// It returns [None] if there is no bit to change. + /// It returns [`None`] if there is no bit to change. /// /// Memory areas will be skipped according to `update_flags`. Memory areas /// that are fully contained in the range or contains the range or intersects diff --git a/src/tests.rs b/src/tests.rs index 6cbb9cd..e2b3e9b 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -309,11 +309,10 @@ fn test_protect() { } } - // Test skip [0x850, 0x900), [0x2850, 0x2900), [0x4850, 0x4900), ... + // Test skip [0x880, 0x900), [0x2880, 0x2900), [0x4880, 0x4900), ... for start in (0..MAX_ADDR).step_by(0x2000) { assert_ok!(set.protect((start + 0x880).into(), 0x80, update_flags(0x3), &mut pt)); } - dump_memory_set(&set); assert_eq!(set.len(), 39); // Unmap all areas.