From 34d55b56bde1269f0a0714d04740a5a478e78170 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 21 Sep 2025 22:11:43 +0800 Subject: [PATCH] Update README to reflect ownership rules --- ds/map/README | 5 +++++ diff --git a/ds/map/README b/ds/map/README index bd63a93daa4f04f6bbe8043cd069f308a4a34bdb..e1ed112f3a3b3fc1d9cbbbc29fdda70c6b48499f 100644 --- a/ds/map/README +++ b/ds/map/README @@ -2,3 +2,8 @@ map: general-purpose map data structures You should create a map with the `new` function in each submodule. Then, you may use functions defined in this module to manipulate the map. + +Note that maps own keys but not values. Do not change the content of the +[]u8 keys when it's already handled by the map; they are expected to stay +consistent and their lifetime is automatically managed along with the map. +However, you must manage the lifetimes of all *opaque values yourself. -- 2.48.1