Skip to content

Commit

Permalink
Resolve clippy comparison_to_empty lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 6, 2020
1 parent ec7eeb6 commit bda6420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl Value {
/// assert_eq!(data.pointer("/a/b/c"), None);
/// ```
pub fn pointer(&self, pointer: &str) -> Option<&Value> {
if pointer == "" {
if pointer.is_empty() {
return Some(self);
}
if !pointer.starts_with('/') {
Expand Down Expand Up @@ -814,7 +814,7 @@ impl Value {
/// }
/// ```
pub fn pointer_mut(&mut self, pointer: &str) -> Option<&mut Value> {
if pointer == "" {
if pointer.is_empty() {
return Some(self);
}
if !pointer.starts_with('/') {
Expand Down

0 comments on commit bda6420

Please sign in to comment.