Skip to content

Commit

Permalink
RawValue -> repr(transparent)
Browse files Browse the repository at this point in the history
This code is from September 2018, at which point serde_json supported
rustc back to 1.15. repr(transparent) stabilized in 1.28. Today the
minimum required compiler is 1.36, so repr(transparent) is okay to use.
  • Loading branch information
dtolnay committed Feb 5, 2023
1 parent e41ee42 commit 7bc6c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ use serde::ser::{Serialize, SerializeStruct, Serializer};
/// raw_value: Box<RawValue>,
/// }
/// ```
#[repr(C)]
#[repr(transparent)]
#[cfg_attr(docsrs, doc(cfg(feature = "raw_value")))]
pub struct RawValue {
json: str,
Expand Down

0 comments on commit 7bc6c86

Please sign in to comment.