Skip to content

Commit

Permalink
doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerhodes committed Apr 25, 2024
1 parent a590f0c commit 46ef2c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ pub struct ToyKV {
pub metrics: ToyKVMetrics,
}

/// Open a database using default settings.
pub fn open(d: &Path) -> Result<ToyKV, ToyKVError> {
with_sync(d, WALSync::Full)
}

/// Open a database using a specific WALSync strategy.
pub fn with_sync(d: &Path, sync: WALSync) -> Result<ToyKV, ToyKVError> {
if !d.is_dir() {
return Err(ToyKVError::DataDirMissing);
Expand Down
2 changes: 2 additions & 0 deletions src/sstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ mod tests_writer {

/// Iterate entries in an on-disk SSTable.
struct SSTableFileReader {
/// tables maintains a set of BufReaders on every sstable
/// file in the set. This isn't that scalable.
tables: Vec<BufReader<File>>,
}

Expand Down

0 comments on commit 46ef2c0

Please sign in to comment.