Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Dec 6, 2024
1 parent 446e0e2 commit 605ec44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ impl Value {
/// let n = v.as_null();
///
/// assert_eq!(n, Value::Int(None));
///
/// // one liner:
/// assert_eq!(Into::<Value>::into(2.2).as_null(), Value::Double(None));
/// ```
pub fn as_null(&self) -> Self {
match self {
Expand Down

0 comments on commit 605ec44

Please sign in to comment.