From a0e99b131d785994638b214ac5721db8f2aa9ae5 Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Mon, 28 May 2018 18:50:07 -0700 Subject: [PATCH] Review comment. --- edn/src/namespaceable_name.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/edn/src/namespaceable_name.rs b/edn/src/namespaceable_name.rs index 4c59ada1..e072c7cc 100644 --- a/edn/src/namespaceable_name.rs +++ b/edn/src/namespaceable_name.rs @@ -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