Skip to content

Commit 605ec44

Browse files
committed
Tweaks
1 parent 446e0e2 commit 605ec44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/value.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ impl Value {
304304
/// let n = v.as_null();
305305
///
306306
/// assert_eq!(n, Value::Int(None));
307+
///
308+
/// // one liner:
309+
/// assert_eq!(Into::<Value>::into(2.2).as_null(), Value::Double(None));
307310
/// ```
308311
pub fn as_null(&self) -> Self {
309312
match self {

0 commit comments

Comments
 (0)