locspan 1.0.0

Code mapping utility types and traits.
Documentation
1
2
3
4
5
6
7
8
9
use miette::SourceSpan;

use crate::Span;

impl From<Span> for SourceSpan {
	fn from(value: Span) -> Self {
		Self::new(value.start.into(), value.end.saturating_sub(value.start))
	}
}