use actions_process_list_provides;
use cfg;
use db;
use rusqlite::Connection;

fn process_session(conn: &Connection) {}

pub fn process(conn: &Connection, rt_cfg: &cfg::Config) {
    if rt_cfg.actions.contains(&cfg::Action::SessionStart) {
        process_session(conn);
    }
    if rt_cfg.actions.contains(&cfg::Action::ListProvides) {
        actions_process_list_provides::process_list_provides(conn);
    }
    if rt_cfg.actions.contains(&cfg::Action::ListTarget) {
        actions_process_list_provides::process_list_targets(conn);
    }
}

pub fn cfg_process_action_db_connect(fred: &mut cfg::Config) -> Connection {
    match fred.rdbms_connection_uri {
        Some(ref connection_uri) => {
            return db::connect_file(&connection_uri);
        }
        None => {
            return db::connect();
        }
    }
}

use actions_process_list_provides;
use cfg;
use clap::ArgMatches;
use db;
use rusqlite::Connection;
use std::collections::HashSet;

fn process_session(conn: &Connection) {}

pub fn process(conn: &Connection, rt_cfg: &cfg::Config) {
    let matcher_session = String::from("session");
    if rt_cfg.actions.contains(&cfg::Action::SessionStart) {
        process_session(conn);
    }
    let matcher_list_provides = String::from("list-provides");
    if rt_cfg.actions.contains(&cfg::Action::ListProvides) {
        actions_process_list_provides::process_list_provides(conn);
    }
    let matcher_list_target = String::from("list-target");
    if rt_cfg.actions.contains(&cfg::Action::ListTarget) {
        actions_process_list_provides::process_list_targets(conn);
    }
}

pub fn cfg_process_action_db_connect(fred: &mut cfg::Config) -> Connection {
    match fred.rdbms_connection_uri {
        Some(ref connection_uri) => {
            return db::connect_file(&connection_uri);
        }
        None => {
            return db::connect();
        }
    }
}

--- 
+++ 
@@ -1,22 +1,17 @@
 use actions_process_list_provides;
 use cfg;
-use clap::ArgMatches;
 use db;
 use rusqlite::Connection;
-use std::collections::HashSet;
 
 fn process_session(conn: &Connection) {}
 
 pub fn process(conn: &Connection, rt_cfg: &cfg::Config) {
-    let matcher_session = String::from("session");
     if rt_cfg.actions.contains(&cfg::Action::SessionStart) {
         process_session(conn);
     }
-    let matcher_list_provides = String::from("list-provides");
     if rt_cfg.actions.contains(&cfg::Action::ListProvides) {
         actions_process_list_provides::process_list_provides(conn);
     }
-    let matcher_list_target = String::from("list-target");
     if rt_cfg.actions.contains(&cfg::Action::ListTarget) {
         actions_process_list_provides::process_list_targets(conn);
     }
Remove unused variabales and unused 'use'

Signed-off-by: Owen Synge <ea78e0e20fce5319fd66b8fd4f543d9e30ef46a5@googlemail.com>
