Skip to content

Commit

Permalink
refactor(cognitarium): move storer outside of state mod
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Jun 5, 2023
1 parent dd6953f commit 4563ae0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/okp4-cognitarium/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub mod execute {
use super::*;
use crate::msg::DataFormat;
use crate::rdf::TripleReader;
use crate::state::TripleStorer;
use crate::storer::TripleStorer;
use std::io::BufReader;

pub fn insert(
Expand Down
1 change: 1 addition & 0 deletions contracts/okp4-cognitarium/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ mod error;
pub mod msg;
mod rdf;
pub mod state;
mod storer;

pub use crate::error::ContractError;
2 changes: 0 additions & 2 deletions contracts/okp4-cognitarium/src/state/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
mod namespaces;
mod store;
mod storer;
mod triples;

pub use namespaces::*;
pub use store::*;
pub use storer::*;
pub use triples::*;
2 changes: 1 addition & 1 deletion contracts/okp4-cognitarium/src/state/triples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
pub type TriplePK<'a> = (&'a [u8], Vec<u8>, Vec<u8>);

pub struct TripleIndexes<'a> {
subject_and_predicate: MultiIndex<'a, (Vec<u8>, Vec<u8>), Triple, TriplePK<'a>>,
pub subject_and_predicate: MultiIndex<'a, (Vec<u8>, Vec<u8>), Triple, TriplePK<'a>>,
}

impl IndexList<Triple> for TripleIndexes<'_> {
Expand Down
File renamed without changes.

0 comments on commit 4563ae0

Please sign in to comment.