Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor(filter-events): drop unused imports and other useless code
Lars Wirzenius committed 2 years ago
commit 43d1a0851bd92aac74920d82aadbed053a73b7e5
parent 6c5012453ef362b6e687999f3326a94db1859c1d
1 file changed +3 -26
modified src/bin/filter-events.rs
@@ -1,31 +1,10 @@
//! Show broker events that are allowed by a filter. This is meant to
//! be helpful for testing a filter configuration.

-
#![allow(unused_imports)]
-
#![allow(unused_variables)]
-
#![allow(dead_code)]
+
use std::{error::Error, path::PathBuf};

-
use std::{
-
    collections::HashMap,
-
    error::Error,
-
    ffi::OsStr,
-
    io::BufReader,
-
    path::{Path, PathBuf},
-
    process::{Command, Stdio},
-
};
-

-
use log::{debug, info};
-
use serde::{Deserialize, Serialize};
-

-
use radicle::prelude::{Id, Profile};
-
use radicle_ci_broker::{
-
    config::Config,
-
    error::BrokerError,
-
    event::NodeEventSource,
-
    filter::{BrokerEvent, EventFilter},
-
    msg::{Request, Response, RunResult},
-
};
-
use radicle_git_ext::Oid;
+
use radicle::prelude::Profile;
+
use radicle_ci_broker::{config::Config, error::BrokerError, event::NodeEventSource};

fn main() {
    if let Err(e) = fallible_main() {
@@ -40,7 +19,6 @@ fn main() {

fn fallible_main() -> Result<(), BrokerError> {
    pretty_env_logger::init();
-
    info!("filter-events starts");

    let mut args = std::env::args().skip(1);
    let filename: PathBuf = if let Some(filename) = args.next() {
@@ -50,7 +28,6 @@ fn fallible_main() -> Result<(), BrokerError> {
    };

    let config = Config::load(&filename)?;
-
    debug!("loaded configuration: {:#?}", config);

    let profile = Profile::load()?;
    let mut source = NodeEventSource::new(profile)?;