• Home
Name Date Size #Lines LOC

..--

src/04-Jul-2025-325158

tests/04-Jul-2025-6660

.android-checksum.jsonD04-Jul-20251,021 11

.cargo-checksum.jsonD04-Jul-2025577 11

Android.bpD04-Jul-20251.5 KiB6357

Cargo.tomlD04-Jul-2025940 2523

LICENSED04-Jul-202510.6 KiB202169

LICENSE-APACHED04-Jul-202510.6 KiB202169

METADATAD04-Jul-2025408 1817

MODULE_LICENSE_APACHE2D04-Jul-20250

README.rstD04-Jul-20252.1 KiB8148

TEST_MAPPINGD04-Jul-2025127 1110

cargo_embargo.jsonD04-Jul-202546 44

README.rst

1maplit
2======
3
4Container / collection literal macros for `HashMap <https://doc.rust-lang.org/beta/std/collections/struct.HashMap.html>`_, `HashSet <https://doc.rust-lang.org/beta/std/collections/struct.HashSet.html>`_, `BTreeMap <https://doc.rust-lang.org/beta/std/collections/struct.BTreeMap.html>`_, `BTreeSet <https://doc.rust-lang.org/beta/std/collections/struct.BTreeSet.html>`_.
5
6You can use these for convenience. Using them has no other implications.
7
8Please read the `API documentation here`__
9
10__ https://docs.rs/maplit/
11
12|build_status|_ |crates|_
13
14.. |build_status| image:: https://travis-ci.org/bluss/maplit.svg?branch=master
15.. _build_status: https://travis-ci.org/bluss/maplit
16
17.. |crates| image:: http://meritbadge.herokuapp.com/maplit
18.. _crates: https://crates.io/crates/maplit
19
20
21Recent Changes
22--------------
23
24- 1.0.2
25
26  - Fix usage of the macros through full paths, like `maplit::hashmap!(..)` (#27)
27
28- 1.0.1
29
30  - Fix ``unused_results`` lint in the macros by @povilasb
31
32- 1.0.0
33
34  - maplit 1.0!
35  - Only documentation changes since the last version
36
37- 0.1.6
38
39  - Add macro ``convert_args!`` for composable opt-in conversion of the
40    expressions being used for the maplit macros.
41
42- 0.1.5
43
44  - Add license files correctly
45  - Add crates.io category
46  - Small doc improvements by @seeekr and @sanmai-NL
47
48- 0.1.4
49
50  - Update docs to point to docs.rs
51
52- 0.1.2
53
54  - Now supports more arguments in hashset!{} and hashmap!{}
55
56- 0.1.0
57
58  - Initial release
59
60FAQ
61---
62
63**Question:** Very large maps take a long time to compile?
64
65**Answer:** Rustc is very slow to compile big expressions with many literals
66(including integers and float literals). Work around this by either
67using explicitly typed literals, or explicitly typed conversions.
68See https://github.com/bluss/maplit/issues/14 for more information.
69
70
71License
72-------
73
74Dual-licensed to be compatible with the Rust project.
75
76Licensed under the Apache License, Version 2.0
77http://www.apache.org/licenses/LICENSE-2.0 or the MIT license
78http://opensource.org/licenses/MIT, at your
79option. This file may not be copied, modified, or distributed
80except according to those terms.
81