Revert "Merge #1037"

This reverts commit 257f9fb2b2, reversing
changes made to 9bae7a35bf.
This commit is contained in:
mpostma 2020-10-27 17:27:47 +01:00
parent 257f9fb2b2
commit 190b78b7be
3 changed files with 7 additions and 50 deletions

View file

@ -12,14 +12,18 @@ pub struct Synonyms {
}
impl Synonyms {
pub(crate) fn put_synonyms<A>(self, writer: &mut heed::RwTxn<MainT>, word: &[u8], synonyms: &fst::Set<A>) -> ZResult<()>
pub fn put_synonyms<A>(self, writer: &mut heed::RwTxn<MainT>, word: &[u8], synonyms: &fst::Set<A>) -> ZResult<()>
where A: AsRef<[u8]>,
{
let bytes = synonyms.as_fst().as_bytes();
self.synonyms.put(writer, word, bytes)
}
pub(crate) fn clear(self, writer: &mut heed::RwTxn<MainT>) -> ZResult<()> {
pub fn del_synonyms(self, writer: &mut heed::RwTxn<MainT>, word: &[u8]) -> ZResult<bool> {
self.synonyms.delete(writer, word)
}
pub fn clear(self, writer: &mut heed::RwTxn<MainT>) -> ZResult<()> {
self.synonyms.clear(writer)
}