Skip to content

Commit 36124d2

Browse files
committed
Merge pull request #23 from apasel422/update
Updates for 1.0 release
2 parents ba1a12e + f5846f2 commit 36124d2

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "linear-map"
3-
version = "0.0.4"
3+
version = "1.0.0"
44
license = "MIT/Apache-2.0"
5-
description = "A map backed by a vector"
5+
description = "A map implemented by searching linearly in a vector."
66
authors = [
7+
"Andrew Paseltiner <[email protected]>",
78
"Tobias Bucher <[email protected]>",
89
]
910
repository = "https://github.com/contain-rs/linear-map"
@@ -13,3 +14,7 @@ readme = "README.md"
1314

1415
[features]
1516
nightly = []
17+
18+
[lib]
19+
test = false
20+
bench = false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
A map backed by a vector
1+
A map implemented by searching linearly in a vector.
22

33
Documentation is available at https://contain-rs.github.io/linear-map/linear_map.

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,10 @@ impl<K: Eq, V> Into<Vec<(K, V)>> for LinearMap<K, V> {
358358
/// ```
359359
#[macro_export]
360360
macro_rules! linear_map {
361-
(@single $($x:tt)*) => (());
362-
(@count $($rest:expr),*) => (<[()]>::len(&[$(linear_map!(@single $rest)),*]));
363361
($($key:expr => $value:expr,)+) => { linear_map!($($key => $value),+) };
364362
($($key:expr => $value:expr),*) => {
365363
{
366-
let _cap = linear_map!(@count $($key),*);
364+
let _cap = <[&str]>::len(&[$(stringify!($key)),*]);
367365
let mut _map = $crate::LinearMap::with_capacity(_cap);
368366
$(
369367
_map.insert($key, $value);

0 commit comments

Comments
 (0)