Skip to main content

borrow_clone_span

Function borrow_clone_span 

Source
pub fn borrow_clone_span<'a, 'b: 'a>(span: &'b Span<'a>) -> Span<'a>
Expand description

Convert a &Span to a Span by using Cow::Borrowed.

Note that a normal Span::clone (and by extension Cow::clone) will preserve the Cow Variant.