Minor refactors.
This commit is contained in:
@@ -150,9 +150,10 @@ impl AST {
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn source(&self) -> Option<&str> {
|
||||
match self.source.as_str() {
|
||||
"" => None,
|
||||
s => Some(s),
|
||||
if self.source.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(self.source.as_str())
|
||||
}
|
||||
}
|
||||
/// Get a reference to the source.
|
||||
|
Reference in New Issue
Block a user