surrealpatch/lib/src/sql/value/single.rs
Tobie Morgan Hitchcock 94ffc054a7 Fix clippy warnings
2022-04-01 23:28:54 +01:00

13 lines
208 B
Rust

use crate::sql::value::Value;
impl Value {
pub fn single(&self) -> &Self {
match self {
Value::Array(v) => match v.value.first() {
None => &Value::None,
Some(v) => v,
},
v => v,
}
}
}