Chris Morgan
›
Git
›
sanitise-file-name
› commitdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
509b04e
)
commit
grep
author
committer
pickaxe
?
search:
re
Mention possible panic in sanitise_to docs
author
Chris Morgan
<me@chrismorgan.info>
Fri, 7 Jan 2022 05:18:32 +0000
committer
Chris Morgan
<me@chrismorgan.info>
Fri, 7 Jan 2022 05:18:32 +0000
src/lib.rs
patch
|
blob
|
history
diff --git
a/src/lib.rs
b/src/lib.rs
index a54ab33f4917a5144a6110699fa075123e8858d9..c2a9ad4de97c507c0fb9d484517115ad2f02ef02 100644
(file)
--- a/
src/lib.rs
+++ b/
src/lib.rs
@@
-777,8
+777,10
@@
impl<A: tinyvec_string::bytearray::ByteArray> 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
///
/// 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.
///
///
/// See [`Options`] for a description of what all the options do.
///