Skip to content

Commit be3b254

Browse files
andrewhickmanzkat
authored andcommittedApr 18, 2023
feat(source): Add getter for NamedSource name (#252)
1 parent 80c6ce8 commit be3b254

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/named_source.rs

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ impl NamedSource {
2727
}
2828
}
2929

30+
/// Gets the name of this `NamedSource`.
31+
pub fn name(&self) -> &str {
32+
&self.name
33+
}
34+
3035
/// Returns a reference the inner [`SourceCode`] type for this
3136
/// `NamedSource`.
3237
pub fn inner(&self) -> &(dyn SourceCode + 'static) {

0 commit comments

Comments
 (0)
Please sign in to comment.