Skip to content

Commit 4db66fb

Browse files
committed
Add 'static lifetime to const's
1 parent 9c9aa1f commit 4db66fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/raw.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ pub struct RawValue {
120120

121121
impl RawValue {
122122
/// A literal JSON null value as `RawValue`.
123-
pub const NULL: &RawValue = RawValue::from_borrowed("null");
123+
pub const NULL: &'static RawValue = RawValue::from_borrowed("null");
124124
/// A literal JSON boolean true value as `RawValue`.
125-
pub const TRUE: &RawValue = RawValue::from_borrowed("true");
125+
pub const TRUE: &'static RawValue = RawValue::from_borrowed("true");
126126
/// A literal JSON boolean false value as `RawValue`.
127-
pub const FALSE: &RawValue = RawValue::from_borrowed("false");
127+
pub const FALSE: &'static RawValue = RawValue::from_borrowed("false");
128128

129129
const fn from_borrowed(json: &str) -> &Self {
130130
unsafe { mem::transmute::<&str, &RawValue>(json) }

0 commit comments

Comments
 (0)