File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " json"
3
- version = " 0.11.2 "
3
+ version = " 0.11.3 "
4
4
authors = [" Maciej Hirsz <maciej.hirsz@gmail.com>" ]
5
5
description = " JSON implementation in Rust"
6
6
repository = " https://github.com/maciejhirsz/json-rust"
Original file line number Diff line number Diff line change @@ -48,15 +48,10 @@ impl PartialEq for Node {
48
48
}
49
49
}
50
50
51
- // Because `Node` contains a raw pointer, `Sync` marker is missing. This
52
- // in turn disables `Sync` for `Object`, and eventually `JsonValue`. Without
53
- // the `Sync` marker it's impossible to create a static `JsonValue`, which
54
- // would break all the API that returns `&'static JsonValue::Null`.
55
- //
56
- // Since `Node` is not exposed anywhere in the API on it's own, and we manage
57
- // heap of long keys manually, we just need to tell the compiler we know what
58
- // we are doing here.
59
- unsafe impl Sync for Node { }
51
+ // Implement `Sync` and `Send` for `Node` despite the use of raw pointers. The struct
52
+ // itself should be memory safe.
53
+ unsafe impl Sync for Node { }
54
+ unsafe impl Send for Node { }
60
55
61
56
// FNV-1a implementation
62
57
//
You can’t perform that action at this time.
0 commit comments