Skip to content

Commit

Permalink
Update strings.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
VeaaC authored Aug 19, 2019
1 parent 92715e7 commit 21031b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ impl StringTable {
/// and the index to the previous string is returned.
pub fn insert(&mut self, s: &str) -> u64 {
// Horrible news, we cannot use entry API since it does not support Borrow
// See: https://github.com/rust-lang/rust/issues/56167
if let Some(&idx) = self.indexed_data.get(s) {
return idx;
}
Expand Down

0 comments on commit 21031b8

Please sign in to comment.