mirror of https://github.com/zkat/miette.git
feat(source): Add getter for NamedSource name (#252)
This commit is contained in:
parent
80c6ce805b
commit
be3b254751
|
|
@ -27,6 +27,11 @@ impl NamedSource {
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets the name of this `NamedSource`.
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
/// Returns a reference the inner [`SourceCode`] type for this
|
||||
/// `NamedSource`.
|
||||
pub fn inner(&self) -> &(dyn SourceCode + 'static) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue