Skip to content

Commit

Permalink
Fix macros requiring types to be copy (#180)
Browse files Browse the repository at this point in the history
* Fix macros requiring types to be copy

* Update Travis to run faster
  • Loading branch information
maciejhirsz authored Mar 18, 2020
1 parent b99d38d commit 752f942
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ rust:
- beta
- nightly

branches:
except:
- dev
- benches

matrix:
jobs:
allow_failures:
- rust: nightly

os:
- linux
fast_finish: true
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "json"
version = "0.12.3"
version = "0.12.4"
authors = ["Maciej Hirsz <hello@maciej.codes>"]
description = "JSON implementation in Rust"
repository = "https://github.com/maciejhirsz/json-rust"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

$(
Expand Down Expand Up @@ -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);

$(
Expand Down

0 comments on commit 752f942

Please sign in to comment.