Skip to content

Commit

Permalink
Cargo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Poussin committed Nov 4, 2021
1 parent aa43aec commit 5408172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashMap;

use anyhow::{Error, Result};
use flexi_logger::{Duplicate, Logger, FileSpec};
use flexi_logger::{Duplicate, FileSpec, Logger};
use structopt::StructOpt;

use rest::{netbox, netshot};
Expand Down Expand Up @@ -138,7 +138,7 @@ fn main() -> Result<(), Error> {
}

log::debug!("Building netbox devices hashmap");
let mut netbox_hashmap: HashMap<_, _> = netbox_devices
let netbox_hashmap: HashMap<_, _> = netbox_devices
.into_iter()
.filter_map(|device| match device.primary_ip4 {
Some(x) => Some((
Expand Down Expand Up @@ -188,11 +188,12 @@ fn main() -> Result<(), Error> {

#[cfg(test)]
mod tests {
use flexi_logger::{ Logger, AdaptiveFormat};
use flexi_logger::{AdaptiveFormat, Logger};

#[ctor::ctor]
fn enable_logging() {
Logger::try_with_str("info").unwrap()
.adaptive_format_for_stderr(AdaptiveFormat::Detailed);
Logger::try_with_str("info")
.unwrap()
.adaptive_format_for_stderr(AdaptiveFormat::Detailed);
}
}
2 changes: 1 addition & 1 deletion src/rest/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Error};
use anyhow::{Error};
use reqwest::Identity;
use std::fs::File;
use std::io::Read;
Expand Down

0 comments on commit 5408172

Please sign in to comment.