From 2e5262096a6278e5dd9c27c890b9c48b486546bb Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 26 Jul 2016 00:00:45 -0700 Subject: [PATCH] Don't compile internal doc example Won't compile anyway since it's not public --- src/utils.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index f9545d5..df75970 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,19 +1,19 @@ use unicode_width::UnicodeWidthStr; -/// Computes a sub-string length that fits in the given `width`. -/// -/// Takes non-breakable elements from `iter`, while keeping the -/// string width under `width` (and adding the length of `delimiter` -/// between each element). -/// -/// Example: -/// -/// ``` -/// let my_text = "blah..."; -/// // This returns the number of bytes for a prefix of `my_text` that -/// // fits within 5 cells. -/// head_bytes(my_text.graphemes(true), 5, ""); -/// ``` +// Computes a sub-string length that fits in the given `width`. +// +// Takes non-breakable elements from `iter`, while keeping the +// string width under `width` (and adding the length of `delimiter` +// between each element). +// +// Example: +// +// ``` +// let my_text = "blah..."; +// // This returns the number of bytes for a prefix of `my_text` that +// // fits within 5 cells. +// head_bytes(my_text.graphemes(true), 5, ""); +// ``` pub fn head_bytes<'a, I: Iterator>(iter: I, width: usize, delimiter: &str) -> usize {