Skip to content

Commit

Permalink
Merge pull request softprops#119 from Veetaha/fix/typos
Browse files Browse the repository at this point in the history
Fix attr_map! macro: use $crate::attr_map! inside
  • Loading branch information
softprops committed Jul 19, 2020
2 parents c59f8ce + 2cd505a commit a9448ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dynomite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,11 @@ numeric_set_attr!(u64 => BTreeSet<u64>);
/// };
macro_rules! attr_map {
(@single $($x:tt)*) => (());
(@count $($rest:expr),*) => (<[()]>::len(&[$(attr_map!(@single $rest)),*]));
($($key:expr => $value:expr,)+) => { attr_map!($($key => $value),+) };
(@count $($rest:expr),*) => (<[()]>::len(&[$($crate::attr_map!(@single $rest)),*]));
($($key:expr => $value:expr,)+) => { $crate::attr_map!($($key => $value),+) };
($($key:expr => $value:expr),*) => {
{
let _cap = attr_map!(@count $($key),*);
let _cap = $crate::attr_map!(@count $($key),*);
let mut _map: ::std::collections::HashMap<String, ::dynomite::dynamodb::AttributeValue> =
::std::collections::HashMap::with_capacity(_cap);
{
Expand Down

0 comments on commit a9448ec

Please sign in to comment.