bors[bot]
402fbec386
Merge rust-analyzer/smol_str#16
...
16: Improve `Arc<str>` creation r=matklad a=sinkuu
While using `Into<String>` could avoid an allocation in `str` -> `String`,
converting `Box<str>` into `Arc<str>` [deallocates it and allocates new](https://doc.rust-lang.org/1.40.0/src/alloc/sync.rs.html#778-796 ) anyway.
The 1st commit is a drive-by simplification.
Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
2020-01-09 16:07:08 +00:00
Shotaro Yamada
f7821f55c8
Improve Arc<str> creation
...
While using `Into` could avoid an allocation in `String` -> `Box<str>`,
converting `Box<str>` into `Arc<str>` deallocates and re-allocates anyway.
2020-01-10 00:56:41 +09:00
Shotaro Yamada
bcb69c61df
Do not count spaces
2020-01-10 00:49:00 +09:00
Aleksey Kladov
9142ee13b4
actually enabled serde std feature
2019-10-09 14:48:16 +03:00
Aleksey Kladov
a9682d10ab
enable std feature for serde
2019-10-09 14:24:56 +03:00
Aleksey Kladov
53b5fd690f
publish v0.1.13
2019-09-26 11:48:37 +03:00
bors[bot]
4474853ddd
Merge rust-analyzer/smol_str#15
...
15: Fix from_reader breaking in serde r=matklad a=bbqsrc
Had to move the `extern crate` outside as otherwise the compiler wouldn't have it.
Co-authored-by: Brendan Molloy <brendan@technocreatives.com>
2019-09-26 08:39:28 +00:00
Brendan Molloy
6e6b205998
Implement visitor
2019-09-26 10:36:46 +02:00
Brendan Molloy
1bb2d0f36c
Demonstrate bug with serde from_reader
2019-09-25 14:46:30 +02:00
bors[bot]
b74b6c25c0
Merge rust-analyzer/smol_str#13
...
13: new_inline_from_ascii: Docs and compile-fail tests r=matklad a=killercup
Just saw the compile-time invariants weren't tested so I used this little known feature of rustdoc to add some tests :)
Co-authored-by: Pascal Hertleif <pascal@technocreatives.com>
2019-07-22 11:32:09 +00:00
Pascal Hertleif
a390271aec
new_inline_from_ascii: Docs and compile-fail tests
2019-07-22 13:28:12 +02:00
Aleksey Kladov
9b27bfaddf
pubish v0.1.12
2019-07-07 14:00:33 +03:00
Aleksey Kladov
e717be12fb
add cosnt-fn ctor
2019-07-07 14:00:10 +03:00
Aleksey Kladov
6e20c9967a
don't use derive
2019-07-07 13:06:09 +03:00
bors[bot]
500d794225
Merge rust-analyzer/smol_str#12
...
12: Add FromIterator with &str/&String/String items r=matklad a=killercup
Co-authored-by: Pascal Hertleif <pascal@technocreatives.com>
2019-05-27 06:30:41 +00:00
Aleksey Kladov
2f924f6954
add bors
2019-05-27 09:29:17 +03:00
Pascal Hertleif
9c77c3ac83
Simplify slicing (no visible perf impact)
2019-05-26 14:27:46 +02:00
Pascal Hertleif
6c94863ae9
Add simple benchmark
2019-05-26 14:17:13 +02:00
Pascal Hertleif
3b30f08b61
Explicitly test for heap allocation, too
2019-05-26 14:17:07 +02:00
Pascal Hertleif
f093bd4ed6
Simplify type names
2019-05-26 14:16:49 +02:00
Pascal Hertleif
03af634229
Explicitly use copy_from_slice
2019-05-26 14:16:37 +02:00
Pascal Hertleif
e1457edb53
Deduplicate FromIterator code
...
Using a private function that is overly generic.
2019-05-25 21:28:32 +02:00
Pascal Hertleif
4f603f4f5d
Add FromIterator with &str/&String/String items
2019-05-25 17:39:32 +02:00
Aleksey Kladov
2b008c4625
SmolStr: Ord
2019-05-21 12:51:58 +03:00
Aleksey Kladov
ea96d39418
Merge pull request rust-analyzer/smol_str#11 from kestred/kstenerson/from_iterator
...
Implement `FromIterator` for `SmolStr`
2019-04-24 07:09:03 +01:00
Kevin Stenerson
a3eb0a1e9b
Implement FromIterator<char> for SmolStr
2019-04-23 14:02:20 -06:00
Aleksey Kladov
0894bfa406
v0.1.10
2019-03-31 14:15:41 +03:00
Aleksey Kladov
21d82e2c47
add is_heap_allocated
2019-03-31 14:15:00 +03:00
jD91mZM2
8c6c5df4f1
Merge pull request rust-analyzer/smol_str#10 from Dushistov/master
...
implement Borrow<str> to make possible search str in HashMap<SmolStr
2019-03-10 07:08:02 +01:00
Evgeniy A. Dushistov
28c8d02439
implement Borrow<str> to make possible search str in HashMap<SmolStr
2019-03-10 04:27:42 +03:00
Aleksey Kladov
05bebe195b
add Default for SmolStr
2019-01-11 13:15:38 +03:00
Aleksey Kladov
18ed52bd04
bump version
2018-12-21 14:16:57 +03:00
Aleksey Kladov
373ca5eda7
add From<SmolStr> for String
2018-12-21 14:16:23 +03:00
Aleksey Kladov
c6c487ea31
bump version
2018-10-13 11:36:56 +03:00
Aleksey Kladov
d64d877b80
Propagate inline to inner wrapper
2018-10-13 11:36:06 +03:00
Aleksey Kladov
1d824951dc
Merge pull request rust-analyzer/smol_str#7 from waywardmonkeys/add-is-empty
...
clippy: Add (and test) is_empty method.
2018-10-13 01:02:13 +03:00
Bruce Mitchener
5076180f77
clippy: Add (and test) is_empty method.
...
Since there is a `len` method, clippy suggests having an `is_empty`
method as well.
2018-10-12 22:16:58 +07:00
Aleksey Kladov
07a632bde9
Merge pull request rust-analyzer/smol_str#8 from waywardmonkeys/test-without-serde
...
Fix test compilation without serde feature.
2018-10-12 17:42:23 +03:00
Aleksey Kladov
dc44be50eb
Merge pull request rust-analyzer/smol_str#9 from waywardmonkeys/cargo-toml-typo-fix
...
Fix typo in Cargo.toml.
2018-10-12 17:41:33 +03:00
Bruce Mitchener
497de131f5
Fix typo in Cargo.toml.
2018-10-12 21:28:44 +07:00
Bruce Mitchener
ea731a9259
Fix test compilation without serde feature.
2018-10-12 21:25:25 +07:00
Aleksey Kladov
0bc5d777be
Merge pull request rust-analyzer/smol_str#5 from waywardmonkeys/fix-typos
...
Fix typos.
2018-10-12 17:20:09 +03:00
Aleksey Kladov
d99879ab85
Merge pull request rust-analyzer/smol_str#6 from waywardmonkeys/rustfmt
...
rustfmt with stable.
2018-10-12 17:19:55 +03:00
Bruce Mitchener
c8ac40fcd8
rustfmt with stable.
2018-10-12 21:18:49 +07:00
Bruce Mitchener
48e1ed47e8
Fix typos.
2018-10-12 21:17:31 +07:00
Aleksey Kladov
01c505b68d
Merge pull request rust-analyzer/smol_str#4 from aochagavia/clarify
...
Clarify docs
2018-10-10 01:08:40 +03:00
Adolfo Ochagavía
4702d59ee7
Clarify docs
2018-10-10 00:00:22 +02:00
Aleksey Kladov
32684ddbb0
Merge pull request rust-analyzer/smol_str#3 from aochagavia/patch-1
...
Fix some stuff in the readme
2018-10-09 19:58:02 +03:00
Adolfo Ochagavía
f183a7fea5
Fix some stuff in the readme
...
I don't understand the sentence that starts with *Runs of `\n` and space symbols*... What do you mean by that?
2018-10-09 18:29:37 +02:00
Aleksey Kladov
47569f04e6
add len method
2018-09-03 21:47:04 +03:00