Skip to content

Commit

Permalink
#2 remove compiler warnings;
Browse files Browse the repository at this point in the history
  • Loading branch information
timgluz committed Mar 16, 2017
1 parent 885e5b4 commit 10edbb5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
9 changes: 4 additions & 5 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use hyper::{ Client, Url };
use hyper::net::HttpsConnector;
use hyper_native_tls::NativeTlsClient;
use std::time::Duration;
use rustc_serialize::json::{self, ToJson, Json};
use rustc_serialize::json::Json;
use product;
use configs::ApiConfigs;

Expand All @@ -29,8 +29,7 @@ fn configs_to_url(api_confs: &ApiConfigs, resource_path: &str)
Some(port) => format!(
"{}://{}:{}/{}/{}",
api_confs.scheme.clone().unwrap(), api_confs.host.clone().unwrap(),
api_confs.port.clone().unwrap(), api_confs.path.clone().unwrap(),
resource_path
port, api_confs.path.clone().unwrap(), resource_path
)
};

Expand Down Expand Up @@ -78,7 +77,7 @@ pub fn fetch_product_by_sha(api_confs: &ApiConfigs, sha: &str)
let resource_path = format!("products/sha/{}", sha.clone() );
let mut resource_url = match configs_to_url(api_confs, resource_path.as_str()) {
Ok(the_url) => the_url,
Err(e) => {
Err(_) => {
return Err(
Error::new(
ErrorKind::InvalidData,
Expand Down Expand Up @@ -110,7 +109,7 @@ pub fn fetch_product(

let mut resource_url = match configs_to_url(api_confs, resource_path.as_str()) {
Ok(the_url) => the_url,
Err(e) => {
Err(_) => {
return Err(
Error::new(
ErrorKind::InvalidData,
Expand Down
1 change: 0 additions & 1 deletion src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::io::prelude::*;
use std::path::Path;
use std::io;
use std::fs::{self, File};
use std::fs::OpenOptions;

fn encode_jar(filepath: &Path) -> String {
//println!("Going to read jar file from {:?}", filepath);
Expand Down
7 changes: 3 additions & 4 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ extern crate csv;
extern crate rustc_serialize;

use std;
use std::io::{Error, ErrorKind};
use std::path::{PathBuf};
use rustc_serialize::{Encodable};
use std::io::Error;
use std::path::PathBuf;
use rustc_serialize::Encodable;


pub trait IOWriter {
Expand All @@ -17,7 +17,6 @@ pub trait IOReader {
}

//--STDOUTWriter

pub struct StdOutWriter {

}
Expand Down

0 comments on commit 10edbb5

Please sign in to comment.