feat(source): Add getter for NamedSource name (#252)

This commit is contained in:
Andrew Hickman 2023-04-09 18:42:48 +01:00 committed by Kat Marchán
parent 80c6ce805b
commit be3b254751
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 5 additions and 0 deletions

View File

@ -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) {