From 752f942e63a4f191dddc1d5c7f15e071f5942d77 Mon Sep 17 00:00:00 2001 From: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Date: Wed, 18 Mar 2020 09:38:43 +0100 Subject: [PATCH] Fix macros requiring types to be copy (#180) * Fix macros requiring types to be copy * Update Travis to run faster --- .travis.yml | 11 ++--------- Cargo.toml | 2 +- src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 960b1e1..9d46a32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,7 @@ rust: - beta - nightly -branches: - except: - - dev - - benches - -matrix: +jobs: allow_failures: - rust: nightly - -os: - - linux + fast_finish: true diff --git a/Cargo.toml b/Cargo.toml index 1ea05db..4fb1950 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "json" -version = "0.12.3" +version = "0.12.4" authors = ["Maciej Hirsz "] description = "JSON implementation in Rust" repository = "https://github.com/maciejhirsz/json-rust" diff --git a/src/lib.rs b/src/lib.rs index 40f6869..ec925ef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -310,7 +310,7 @@ macro_rules! array { // Construct the actual array (@END $( $i:expr, )*) => ({ - let size = 0 $( + {let _ = || $i; 1} )*; + let size = 0 $( + {let _ = &$i; 1} )*; let mut array = Vec::with_capacity(size); $( @@ -404,7 +404,7 @@ macro_rules! object { // Construct the actual object (@END $( $k:expr => $v:expr, )*) => ({ - let size = 0 $( + {let _ = || $k; 1} )*; + let size = 0 $( + {let _ = &$k; 1} )*; let mut object = $crate::object::Object::with_capacity(size); $(