Skip to main content

max / makenotwork

tagtree: document the remaining enum fields, seal with warn(missing_docs)
Author: Max Johnson <me@maxj.phd> · 2026-08-16 01:15 UTC
Signed with PGP, not checked
Commit: fead539cd5c3192ba090208587ff072339b019d3
Parent: d08f132
1 file changed, +14 insertions, -2 deletions
@@ -29,6 +29,8 @@
29 29 //! and, for the ecosystem view, the maintainer wiki.
30 30 //! <!-- wiki: tagtree-overview -->
31 31
32 + #![warn(missing_docs)]
33 +
32 34 use std::fmt;
33 35
34 36 /// Separator between tag levels.
@@ -82,7 +84,10 @@
82 84 /// The tag was empty.
83 85 Empty,
84 86 /// The tag exceeded the configured maximum length (in characters).
85 - TooLong { max: usize },
87 + TooLong {
88 + /// The configured maximum length, in characters.
89 + max: usize,
90 + },
86 91 /// The tag started or ended with a separator dot.
87 92 LeadingOrTrailingDot,
88 93 /// The tag contained consecutive separator dots.
@@ -90,10 +95,17 @@
90 95 /// The tag contained a character outside the allowed set.
91 96 InvalidChar(char),
92 97 /// The tag had more segments than the configured maximum depth.
93 - TooDeep { levels: usize, max: usize },
98 + TooDeep {
99 + /// How many segments the tag actually had.
100 + levels: usize,
101 + /// The configured maximum depth.
102 + max: usize,
103 + },
94 104 /// The tag had fewer segments than the configured semantic prefix requires.
95 105 InsufficientDepth {
106 + /// How many segments the tag must have, which is the semantic depth.
96 107 min_segments: usize,
108 + /// The configured semantic depth that set the minimum.
97 109 semantic_depth: usize,
98 110 },
99 111 }