Moved index out of db module

This commit is contained in:
Antoine Gersant 2017-07-01 12:03:15 -07:00
parent 48f2913816
commit 11ff053b9d
3 changed files with 5 additions and 4 deletions

View file

@ -14,10 +14,10 @@ use errors::*;
use user::*;
use vfs::{MountPoint, Vfs};
mod index;
mod schema;
use self::index::{CollectionFile, Directory, Song};
use index;
use index::{CollectionFile, Directory, Song};
pub use self::schema::*;
#[allow(dead_code)]
@ -127,7 +127,7 @@ impl DB {
index::update_loop(self);
}
fn get_vfs(&self) -> Result<Vfs> {
pub fn get_vfs(&self) -> Result<Vfs> {
use self::mount_points::dsl::*;
let mut vfs = Vfs::new();
let connection = self.connection.lock().unwrap();

View file

@ -11,7 +11,7 @@ use std::time;
use config::{MiscSettings, UserConfig};
use db::DB;
use db::schema::*;
use db::{directories, misc_settings, songs};
use errors::*;
use metadata;

View file

@ -63,6 +63,7 @@ mod config;
mod db;
mod ddns;
mod errors;
mod index;
mod metadata;
mod ui;
mod user;