Skip to content

Commit 752f942

Browse files
authored
Fix macros requiring types to be copy (#180)
* Fix macros requiring types to be copy * Update Travis to run faster
1 parent b99d38d commit 752f942

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.travis.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@ rust:
55
- beta
66
- nightly
77

8-
branches:
9-
except:
10-
- dev
11-
- benches
12-
13-
matrix:
8+
jobs:
149
allow_failures:
1510
- rust: nightly
16-
17-
os:
18-
- linux
11+
fast_finish: true

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "json"
3-
version = "0.12.3"
3+
version = "0.12.4"
44
authors = ["Maciej Hirsz <[email protected]>"]
55
description = "JSON implementation in Rust"
66
repository = "https://github.com/maciejhirsz/json-rust"

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ macro_rules! array {
310310

311311
// Construct the actual array
312312
(@END $( $i:expr, )*) => ({
313-
let size = 0 $( + {let _ = || $i; 1} )*;
313+
let size = 0 $( + {let _ = &$i; 1} )*;
314314
let mut array = Vec::with_capacity(size);
315315

316316
$(
@@ -404,7 +404,7 @@ macro_rules! object {
404404

405405
// Construct the actual object
406406
(@END $( $k:expr => $v:expr, )*) => ({
407-
let size = 0 $( + {let _ = || $k; 1} )*;
407+
let size = 0 $( + {let _ = &$k; 1} )*;
408408
let mut object = $crate::object::Object::with_capacity(size);
409409

410410
$(

0 commit comments

Comments
 (0)