Removed session as separate code.

This commit is contained in:
Jeff Baskin 2023-03-26 09:30:42 -04:00
parent c75bea3913
commit ee45375085
3 changed files with 9 additions and 39 deletions

View File

@ -1,6 +1,12 @@
use async_std::{fs::{read, remove_file, write}, path::PathBuf};
use super::{DataType, DBError, ErrorCode, FileData, SessionData};
use std::{cell::Cell, time::{Duration, Instant}};
use super::{DBError, DataType, ErrorCode, FileData, SessionData};
use async_std::{
fs::{read, remove_file, write},
path::PathBuf,
};
use std::{
cell::Cell,
time::{Duration, Instant},
};
pub struct Entry {
data: DataType,

View File

@ -1,14 +1,12 @@
mod database;
mod entry;
mod error;
mod session;
mod store;
use async_std::path::PathBuf;
use database::Database;
use entry::Entry;
use error::{DBError, ErrorCode};
use session::Session;
use std::{slice, str};
use store::Store;
@ -134,10 +132,6 @@ impl MoreThanText {
}
}
}
fn new_session(&self) -> Session {
Session::new()
}
}
#[cfg(test)]
@ -367,16 +361,3 @@ mod create {
}
}
}
#[cfg(test)]
mod sessions {
use super::*;
use tempfile::tempdir;
#[async_std::test]
async fn create_session() {
let dir = tempdir().unwrap();
let mtt = MoreThanText::new(dir.path().to_str().unwrap()).await.unwrap();
mtt.new_session();
}
}

View File

@ -1,17 +0,0 @@
pub struct Session;
impl Session {
pub fn new() -> Self {
Self {}
}
}
#[cfg(test)]
mod session {
use super::*;
#[test]
fn create() {
Session::new();
}
}