Skip to content

Commit

Permalink
Merge pull request #721 from fsktom/master
Browse files Browse the repository at this point in the history
Implement `Candidate` for `Rc<str>`
  • Loading branch information
gwenn authored Aug 14, 2023
2 parents 5e63f1b + 8d0da03 commit 35ea49a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ impl Candidate for &'_ str {
}
}

impl Candidate for Rc<str> {
fn display(&self) -> &str {
self
}

fn replacement(&self) -> &str {
self
}
}

/// Completion candidate pair
#[derive(Clone)]
pub struct Pair {
Expand Down

0 comments on commit 35ea49a

Please sign in to comment.