about summary refs log tree commit diff
path: root/src/rt/jemalloc/test/aligned_alloc.c
diff options
context:
space:
mode:
authorMarvin Löbel <loebel.marvin@gmail.com>2013-09-14 19:37:45 +0200
committerMarvin Löbel <loebel.marvin@gmail.com>2013-09-16 16:57:50 +0200
commit76c3e8a38cea2fe6342d83158c267e57a6b1f53f (patch)
treedb7c6ca84a3e769ed40343411ecf43f369883418 /src/rt/jemalloc/test/aligned_alloc.c
parent3e1803f3af1adc1b2e5595650f6920f40bbedc2e (diff)
downloadrust-76c3e8a38cea2fe6342d83158c267e57a6b1f53f.tar.gz
rust-76c3e8a38cea2fe6342d83158c267e57a6b1f53f.zip
Add an SendStr type
A SendStr is a string that can hold either a ~str or a &'static str.
This can be useful as an optimization when an allocation is sometimes needed but the common case is statically known.

Possible use cases include Maps with both static and owned keys, or propagating error messages across task boundaries.

SendStr implements most basic traits in a way that hides the fact that it is an enum; in particular things like order and equality are only determined by the content of the wrapped strings.

Replaced std::rt:logging::SendableString with SendStr
Added tests for using an SendStr as key in Hash- and Treemaps
Diffstat (limited to 'src/rt/jemalloc/test/aligned_alloc.c')
0 files changed, 0 insertions, 0 deletions