Mercurial > lbo > hg > memoize
changeset 54:f655f3e09e4a
add note about not working on methods
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Wed, 26 May 2021 11:24:34 +0200 |
parents | d675b9e02fb6 |
children | ed0142e2b833 2f96e135ea5d |
files | src/lib.rs |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib.rs Mon Feb 22 21:49:27 2021 +0100 +++ b/src/lib.rs Wed May 26 11:24:34 2021 +0200 @@ -153,7 +153,8 @@ * So far, it works on functions with one or more arguments which are `Clone`- and `Hash`-able, * returning a `Clone`-able value. Several clones happen within the storage and recall layer, with * the assumption being that `memoize` is used to cache such expensive functions that very few - * `clone()`s do not matter. + * `clone()`s do not matter. `memoize` doesn't work on methods (functions with `[&/&mut/]self` + * receiver). * * Calls are memoized for the lifetime of a program, using a statically allocated, Mutex-protected * HashMap.