Skip to content

Commit

Permalink
Fix compiler errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed Oct 12, 2022
1 parent 3cb4424 commit 523a57b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/hdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ impl Hdt {
let mut br = BufReader::new(file);
let mut hdtr = HDTReader::new(&mut br);
hdtr.read_meta()?;
let triple_sect = TripleSect::read(&mut br)?;
let triple_sect = TripleSect::read(&mut hdtr.reader)?;
Ok (Hdt {global_ci: hdtr.global_ci.unwrap(), header: hdtr.header.unwrap(), dict: hdtr.dict.unwrap(), triple_sect})
}


pub fn triples(&mut self) -> impl Iterator<Item = (String, String, String)> {
let mut it = &self.triple_sect.read_all_ids().into_iter();
it.map(|_| ("".to_owned(),"".to_owned(),"".to_owned()))
// todo: implement and use into_iter with references for bitmap
self.triple_sect.clone().read_all_ids().into_iter()
.map(|_| ("".to_owned(),"".to_owned(),"".to_owned()))
/* it.map(|id: &TripleId| {
let subject = self.dict.id_to_string(id.subject_id, IdKind::Subject);
let predicate = self.dict.id_to_string(id.predicate_id, IdKind::Predicate);
Expand Down
2 changes: 1 addition & 1 deletion src/hdt_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::io;
use std::io::BufRead;

pub struct HDTReader<'a, R: BufRead> {
reader: &'a mut R,
pub reader: &'a mut R,
pub global_ci: Option<ControlInfo>,
pub header: Option<Header>,
pub dict: Option<Dict>,
Expand Down

0 comments on commit 523a57b

Please sign in to comment.