initial split of database to a separate crate

It should reduce compile time / memory usage to put quite a bit of the code
into a separate crate. I also intend to limit visibility of some things to
only within the db crate, but that's for a future change. This is the smallest
move that will compile.
This commit is contained in:
Scott Lamb
2018-02-20 23:15:39 -08:00
parent d84e754b2a
commit 31adbc1e9f
30 changed files with 153 additions and 91 deletions

View File

@@ -32,8 +32,8 @@ extern crate hyper;
use core::borrow::Borrow;
use core::str::FromStr;
use db;
use dir::SampleFileDir;
use db::{self, recording};
use db::dir::SampleFileDir;
use failure::Error;
use fnv::FnvHashMap;
use futures::{future, stream};
@@ -44,7 +44,6 @@ use hyper::header;
use hyper::server::{self, Request, Response};
use mime;
use mp4;
use recording;
use reffers::ARefs;
use regex::Regex;
use serde_json;
@@ -501,8 +500,8 @@ impl server::Service for Service {
#[cfg(test)]
mod tests {
use db::testutil;
use super::Segments;
use testutil;
#[test]
fn test_segments() {
@@ -531,9 +530,9 @@ mod bench {
extern crate reqwest;
extern crate test;
use db::testutil::{self, TestDb};
use hyper;
use self::test::Bencher;
use testutil::{self, TestDb};
use uuid::Uuid;
struct Server {