From e5ba11332ffc0ffcddbcdb327123b23c37c77f8a Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 14 Sep 2021 17:04:16 -0700 Subject: [PATCH] Correctly recognize defined spans. Without this change, the `to_range` method method returns `None` even when spans are enabled. --- src/span.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/span.rs b/src/span.rs index 3421c35f0a..2324b5b8b5 100644 --- a/src/span.rs +++ b/src/span.rs @@ -54,7 +54,7 @@ impl Span { /// Check wether `self` was defined or is a default/unknown span fn is_defined(&self) -> bool { - *self == Self::default() + *self != Self::default() } }