borrowed

Function borrowed 

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

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

ยงExample

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

#[test]
fn test_1() {
 let a = Cow::Borrowed("abc");
 assert::borrowed(&a);
}