mirror of https://github.com/zkat/miette.git
Rename source_utf8 to source_str
This commit is contained in:
parent
7a3b008c06
commit
bed9762571
|
|
@ -198,7 +198,7 @@ pub trait SourceCode: Send + Sync {
|
||||||
|
|
||||||
/// Borrow the source bytes as a string slice.
|
/// Borrow the source bytes as a string slice.
|
||||||
/// Returns None if the source is not a valid utf-8 string.
|
/// 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())
|
std::str::from_utf8(self.source_bytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue