[oden-js] Value implements AsRef
Makes working with temporaries a lot easier
This commit is contained in:
parent
c990de5ad6
commit
a0afae092a
1 changed files with 6 additions and 0 deletions
|
|
@ -481,6 +481,12 @@ impl Clone for Value {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AsRef<ValueRef> for Value {
|
||||||
|
fn as_ref(&self) -> &ValueRef {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue