From aee9337fbc910a766bb601fc6ac6d34796788909 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 7 Jan 2022 16:18:32 +1100 Subject: [PATCH] Mention possible panic in sanitise_to docs --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a54ab33..c2a9ad4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -777,8 +777,10 @@ impl Stringy for tinyvec_string::ArrayS /// /// When you use [`sanitise`] or [`sanitise_with_options`], the perfect allocation is artisanally /// crafted (or something). If you use this carelessly, you may actually cause *more* allocations -/// to be made, rather than less. You may therefore wish to use [`sufficient_alloc_size`] in some -/// cases to calculate how much more to reserve ahead of time. +/// to be made, rather than less, or panic if `S` is a non-growable type (e.g. +/// `tinyvec::ArrayString`). You may therefore wish to use [`sufficient_alloc_size`] or +/// [`max_alloc_size`] or [`max_alloc_size_const`] in some cases to calculate how much more to +/// reserve ahead of time. /// /// See [`Options`] for a description of what all the options do. /// -- 2.42.0