Skip to content

Commit

Permalink
feat(source): Add getter for NamedSource name (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhickman authored and zkat committed Apr 18, 2023
1 parent 80c6ce8 commit be3b254
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/named_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit be3b254

Please sign in to comment.