From: Chris Morgan Date: Fri, 7 Jan 2022 05:18:32 +0000 (+1100) Subject: Mention possible panic in sanitise_to docs X-Git-Url: https://git.chrismorgan.info/sanitise-file-name/commitdiff_plain/aee9337fbc910a766bb601fc6ac6d34796788909 Mention possible panic in sanitise_to docs --- 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. ///