Review comment.
This commit is contained in:
parent
23a616db22
commit
a0e99b131d
1 changed files with 5 additions and 6 deletions
|
@ -36,17 +36,16 @@ pub struct NamespaceableName {
|
|||
// the two parts.
|
||||
components: String,
|
||||
|
||||
// The index (in bytes) into `components` of the dividing solidus — the place
|
||||
// where the namespace ends and the name begins.
|
||||
// The index (in bytes) into `components` of the dividing solidus — the character
|
||||
// between the namespace and the name.
|
||||
//
|
||||
// If this is zero, it means that this is _not_ a namespaced value!
|
||||
//
|
||||
// Important: The following invariants around `boundary` must be maintained
|
||||
// for memory safety.
|
||||
// Important: The following invariants around `boundary` must be maintained:
|
||||
//
|
||||
// 1. `boundary` must always be less than or equal to `components.len()`.
|
||||
// 2. `boundary` must be byte index that points to a character boundary,
|
||||
// and not point into the middle of a utf8 codepoint. That is,
|
||||
// 2. `boundary` must be a byte index that points to a character boundary,
|
||||
// and not point into the middle of a UTF-8 codepoint. That is,
|
||||
// `components.is_char_boundary(boundary)` must always be true.
|
||||
//
|
||||
// These invariants are enforced by `NamespaceableName::namespaced()`, and since
|
||||
|
|
Loading…
Reference in a new issue