mirror of https://github.com/zkat/miette.git
feat(span): make span end optional
This commit is contained in:
parent
f8cf66cd90
commit
1cb0ad3852
|
|
@ -102,8 +102,8 @@ pub struct SourceSpan {
|
||||||
pub label: String,
|
pub label: String,
|
||||||
/// The start of the span.
|
/// The start of the span.
|
||||||
pub start: SourceLocation,
|
pub start: SourceLocation,
|
||||||
/// The end of the span.
|
/// The end of the span. Optional
|
||||||
pub end: SourceLocation,
|
pub end: Option<SourceLocation>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,7 @@ fn fancy() -> io::Result<()> {
|
||||||
column: 0,
|
column: 0,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
},
|
},
|
||||||
end: SourceLocation {
|
end: None,
|
||||||
line: 0,
|
|
||||||
column: 4,
|
|
||||||
offset: 4,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue