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 11[package ]
22name = " json"
3- version = " 0.11.2 "
3+ version = " 0.11.3 "
44authors = [" Maciej Hirsz <maciej.hirsz@gmail.com>" ]
55description = " JSON implementation in Rust"
66repository = " https://github.com/maciejhirsz/json-rust"
Original file line number Diff line number Diff line change @@ -48,15 +48,10 @@ impl PartialEq for Node {
4848 }
4949}
5050
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 { }
6055
6156// FNV-1a implementation
6257//
You can’t perform that action at this time.
0 commit comments