Skip to content

Commit

Permalink
docs: Describe Table order based on concepts
Browse files Browse the repository at this point in the history
Avoid implementation which can go stale, like it did here.
  • Loading branch information
JustusAdam authored and epage committed Jan 30, 2024
1 parent 106d51f commit 5381d7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/toml/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Value>;

impl Table {
Expand Down

0 comments on commit 5381d7b

Please sign in to comment.