owned

Function owned 

Source
pub fn owned<R>(a: &Cow<'_, R>)
where R: Debug + PartialEq + ToOwned + ?Sized,
Expand description

Asserts that the value implements Cow and is owned. This is useful for testing that a Cow is cloned.

ยงExample

use std::borrow::Cow;
use common_testing::assert;

#[test]
fn test_1() {
 let a = Cow::Owned("abc".to_string());
 assert::owned(&a);
}