Updated dependencies

This commit is contained in:
Antoine Gersant 2017-07-06 20:49:34 -07:00
parent b607bbaceb
commit 2117d94649
5 changed files with 550 additions and 293 deletions

802
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,34 +9,34 @@ ui = []
[dependencies] [dependencies]
ape = "0.1.2" ape = "0.1.2"
app_dirs = { git = "https://github.com/agersant/app-dirs-rs" } app_dirs = { git = "https://github.com/agersant/app-dirs-rs" }
diesel = { version = "0.13.0", features = ["sqlite"] } diesel = { version = "0.14.0", features = ["sqlite"] }
diesel_codegen = { version = "0.13.0", features = ["sqlite"] } diesel_codegen = { version = "0.14.0", features = ["sqlite"] }
error-chain = "0.10.0" error-chain = "0.10.0"
getopts = "0.2.14" getopts = "0.2.14"
hyper = "0.10.0" hyper = "0.11.1"
id3 = "0.1.11" id3 = "0.1.11"
image = "0.13.0" image = "0.14.0"
iron = "0.5.1" iron = "0.5.1"
lewton = "0.5.2" lewton = "0.6.2"
metaflac = "0.1.4" metaflac = "0.1.4"
mount = "0.3.0" mount = "0.3.0"
params = "*" params = { git = "https://github.com/euclio/params", branch="update" }
rand = "0.3.15" rand = "0.3.15"
regex = "0.1" regex = "0.2.2"
ring = "0.9.7" ring = "0.9.7"
reqwest = "0.6.2" reqwest = "0.6.2"
router = "0.5.1" router = "0.5.1"
secure-session = "0.1.0" secure-session = "0.2.0"
serde = "0.9" serde = "1.0"
serde_derive = "0.9" serde_derive = "1.0"
serde_json = "0.9" serde_json = "1.0"
staticfile = "0.4.0" staticfile = "0.4.0"
toml = "=0.3.2" toml = "0.4.2"
typemap = "0.3" typemap = "0.3"
url = "1.2.0" url = "1.2.0"
[dependencies.rusqlite] [dependencies.rusqlite]
version = "0.11.0" version = "0.12.0"
features = ["bundled"] features = ["bundled"]
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]

View file

@ -226,7 +226,7 @@ fn clean_path_string(path_string: &str) -> path::PathBuf {
let mut correct_separator = String::new(); let mut correct_separator = String::new();
correct_separator.push(path::MAIN_SEPARATOR); correct_separator.push(path::MAIN_SEPARATOR);
let path_string = separator_regex.replace_all(path_string, correct_separator.as_str()); let path_string = separator_regex.replace_all(path_string, correct_separator.as_str());
path::Path::new(&path_string).iter().collect() path::Path::new(path_string.deref()).iter().collect()
} }
fn _get_test_db(name: &str) -> DB { fn _get_test_db(name: &str) -> DB {

View file

@ -156,7 +156,10 @@ fn run() -> Result<()> {
mount.mount("/", Static::new(web_dir_path)); mount.mount("/", Static::new(web_dir_path));
println!("Starting up server"); println!("Starting up server");
let mut server = Iron::new(mount).http(("0.0.0.0", 5050))?; let mut server = match Iron::new(mount).http(("0.0.0.0", 5050)) {
Ok(s) => s,
Err(e) => bail!("Error starting up server: {}", e),
};
// Start DDNS updates // Start DDNS updates
let db_ref = db.clone(); let db_ref = db.clone();
@ -166,7 +169,9 @@ fn run() -> Result<()> {
ui::run(); ui::run();
println!("Shutting down server"); println!("Shutting down server");
server.close()?; if let Err(e) = server.close() {
bail!("Error shutting down server: {}", e);
}
Ok(()) Ok(())
} }

View file

@ -74,8 +74,8 @@ fn read_ape_x_of_y(item: &ape::Item) -> Option<u32> {
match item.value { match item.value {
ape::ItemValue::Text(ref s) => { ape::ItemValue::Text(ref s) => {
let format = Regex::new(r#"^\d+"#).unwrap(); let format = Regex::new(r#"^\d+"#).unwrap();
if let Some((start, end)) = format.find(s) { if let Some(m) = format.find(s) {
s[start..end].parse().ok() s[m.start()..m.end()].parse().ok()
} else { } else {
None None
} }