Rename source_utf8 to source_str

This commit is contained in:
Kyle 2023-02-08 19:20:28 -08:00
parent 7a3b008c06
commit bed9762571
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ pub trait SourceCode: Send + Sync {
/// Borrow the source bytes as a string slice.
/// Returns None if the source is not a valid utf-8 string.
fn source_utf8(&self) -> Result<&str, std::str::Utf8Error> {
fn source_str(&self) -> Result<&str, std::str::Utf8Error> {
std::str::from_utf8(self.source_bytes())
}
}