fn trim_span(span: Span, from_pos: BytePos, to_pos: BytePos) -> Span