mirror of https://github.com/zkat/miette.git
Add getter for NamedSource name
This commit is contained in:
parent
80c6ce805b
commit
7d4ed1285d
|
|
@ -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
|
/// Returns a reference the inner [`SourceCode`] type for this
|
||||||
/// `NamedSource`.
|
/// `NamedSource`.
|
||||||
pub fn inner(&self) -> &(dyn SourceCode + 'static) {
|
pub fn inner(&self) -> &(dyn SourceCode + 'static) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue