Skip to content

Commit

Permalink
Re-format.
Browse files Browse the repository at this point in the history
pythonspeed committed Jan 24, 2024
1 parent 60ceb32 commit 4a2d33f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/validator/cbor.rs
Original file line number Diff line number Diff line change
@@ -373,7 +373,7 @@ impl<'a> CBORValidator<'a> {

/// Extract the underlying CBOR Value.
pub fn extract_cbor(self) -> Value {
self.cbor
self.cbor
}

fn validate_array_items<T: std::fmt::Debug + 'static>(
@@ -3911,11 +3911,11 @@ mod tests {

#[test]
fn extract_cbor() {
use ciborium::value::Value;
use ciborium::value::Value;

let cbor = Value::Float(1.23);
let cddl = cddl_from_str("start = any", true).unwrap();
let cv = CBORValidator::new(&cddl, cbor, None);
assert_eq!(cv.extract_cbor(), Value::Float(1.23));
let cbor = Value::Float(1.23);
let cddl = cddl_from_str("start = any", true).unwrap();
let cv = CBORValidator::new(&cddl, cbor, None);
assert_eq!(cv.extract_cbor(), Value::Float(1.23));
}
}

0 comments on commit 4a2d33f

Please sign in to comment.