Skip to content

Commit bda6420

Browse files
committed
Resolve clippy comparison_to_empty lint
1 parent ec7eeb6 commit bda6420

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/value/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ impl Value {
749749
/// assert_eq!(data.pointer("/a/b/c"), None);
750750
/// ```
751751
pub fn pointer(&self, pointer: &str) -> Option<&Value> {
752-
if pointer == "" {
752+
if pointer.is_empty() {
753753
return Some(self);
754754
}
755755
if !pointer.starts_with('/') {
@@ -814,7 +814,7 @@ impl Value {
814814
/// }
815815
/// ```
816816
pub fn pointer_mut(&mut self, pointer: &str) -> Option<&mut Value> {
817-
if pointer == "" {
817+
if pointer.is_empty() {
818818
return Some(self);
819819
}
820820
if !pointer.starts_with('/') {

0 commit comments

Comments
 (0)