jsonlogic_rs/op/
impure.rs

1//! Impure Operations
2
3use serde_json::Value;
4
5use crate::error::Error;
6
7/// Log the Operation's Value(s)
8///
9/// The reference implementation ignores any arguments beyond the first,
10/// and the specification seems to indicate that the first argument is
11/// the only one considered, so we're doing the same.
12pub fn log(items: &Vec<&Value>) -> Result<Value, Error> {
13    println!("{}", items[0]);
14    Ok(items[0].clone())
15}