Skip to content

Commit 8ee7564

Browse files
committed
Use latest version of error-chain crate
1 parent dfb727c commit 8ee7564

File tree

14 files changed

+26
-38
lines changed

14 files changed

+26
-38
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ r2d2_postgres = "0.12"
2525
url = "1.4"
2626
libc = "0.2"
2727
badge = { version = "0", path = "src/web/badge" }
28-
error-chain = "0.5"
28+
error-chain = "0.10"
2929
comrak = { version = "0.1", default-features = false }
3030

3131
# iron dependencies

src/db/add_package.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ use reqwest::header::{Accept, qitem};
1616
use semver;
1717
use postgres::Connection;
1818
use time;
19-
20-
use errors::*;
21-
19+
use error::Result;
2220

2321

2422
/// Adds a package into database.

src/db/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use postgres::Connection;
1010
use rustc_serialize::json::{Json, ToJson};
1111
use std::fs::File;
1212
use std::io::Read;
13-
use errors::*;
13+
use error::Result;
1414

1515

1616

src/docbuilder/chroot_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::process::{Command, Output};
88
use std::path::PathBuf;
99
use postgres::Connection;
1010
use rustc_serialize::json::Json;
11-
use errors::*;
11+
use error::Result;
1212
use regex::Regex;
1313

1414

src/docbuilder/crates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::io::BufReader;
44
use std::fs;
55
use std::path::PathBuf;
66
use rustc_serialize::json::Json;
7-
use errors::*;
7+
use error::Result;
88

99

1010
fn crates_from_file<F>(path: &PathBuf, func: &mut F) -> Result<()>

src/docbuilder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::io::BufReader;
1313
use std::path::PathBuf;
1414
use std::collections::BTreeSet;
1515
use DocBuilderOptions;
16-
use errors::*;
16+
use error::Result;
1717

1818

1919
/// chroot based documentation builder

src/docbuilder/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::{env, fmt};
44
use std::path::PathBuf;
5-
use errors::*;
5+
use error::Result;
66

77

88
#[derive(Clone)]

src/docbuilder/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use super::DocBuilder;
55
use db::connect_db;
6-
use errors::*;
6+
use error::Result;
77
use crates_index_diff::{ChangeKind, Index};
88

99

src/errors.rs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,14 @@ use git2;
1010

1111

1212
error_chain! {
13-
types {
14-
Error, ErrorKind, ChainErr, Result;
15-
}
16-
17-
links {
18-
}
19-
2013
foreign_links {
21-
io::Error, IoError;
22-
json::BuilderError, JsonBuilderError;
23-
postgres::error::ConnectError, PostgresConnectError;
24-
postgres::error::Error, PostgresError;
25-
reqwest::Error, ReqwestError;
26-
git2::Error, Git2Error;
27-
MagicError, MagicError;
28-
Box<cargo::CargoError>, CargoError;
29-
}
30-
31-
errors {
14+
IoError(io::Error);
15+
JsonBuilderError(json::BuilderError);
16+
PostgresConnectError(postgres::error::ConnectError);
17+
PostgresError(postgres::error::Error);
18+
ReqwestError(reqwest::Error);
19+
Git2Error(git2::Error);
20+
MagicError(MagicError);
21+
CargoError(Box<cargo::CargoError>);
3222
}
3323
}

0 commit comments

Comments
 (0)