From 5381d7b920ec4a5540837a568b7b12b94ea499f4 Mon Sep 17 00:00:00 2001 From: Justus Adam Date: Sun, 28 Jan 2024 12:52:54 -0500 Subject: [PATCH] docs: Describe Table order based on concepts Avoid implementation which can go stale, like it did here. --- crates/toml/src/table.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/toml/src/table.rs b/crates/toml/src/table.rs index a2d392bd..ac70532f 100644 --- a/crates/toml/src/table.rs +++ b/crates/toml/src/table.rs @@ -7,8 +7,11 @@ use crate::map::Map; use crate::Value; /// Type representing a TOML table, payload of the `Value::Table` variant. -/// By default it is backed by a BTreeMap, enable the `preserve_order` feature -/// to use a LinkedHashMap instead. +/// +/// By default it entries are stored in +/// [lexicographic order](https://doc.rust-lang.org/std/primitive.str.html#impl-Ord-for-str) +/// of the keys. Enable the `preserve_order` feature to store entries in the order they appear in +/// the source file. pub type Table = Map; impl Table {