From c92cdad3ddfc6cce608af5b4cf59115b3745ab39 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 5 Mar 2014 09:41:35 +0000 Subject: Str::slice_chars() is O(end), not O(end - begin) --- src/libstd/str.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/str.rs b/src/libstd/str.rs index ef9be6ee70c..20aaafbe677 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1997,8 +1997,8 @@ pub trait StrSlice<'a> { /// handle edge cases such as leaving a combining character as the /// first code point of the string. /// - /// Due to the design of UTF-8, this operation is `O(end - - /// begin)`. See `slice`, `slice_to` and `slice_from` for `O(1)` + /// Due to the design of UTF-8, this operation is `O(end)`. + /// See `slice`, `slice_to` and `slice_from` for `O(1)` /// variants that use byte indices rather than code point /// indices. /// -- cgit 1.4.1-3-g733a5