Skip to content

Commit

Permalink
Merge pull request #52 from dottorblaster/fix-errors-descriptions-dep…
Browse files Browse the repository at this point in the history
…recated

Fix .description() deprecation for errors
  • Loading branch information
dottorblaster authored Jun 30, 2020
2 parents b76216c + 08be006 commit 2e58e72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "siren"
version = "1.3.0"
version = "1.3.1"
authors = ["Alessio Biancalana <dottorblaster@gmail.com>"]
description = "Your friendly neighborhood monitoring CLI tool."
homepage = "https://github.com/dottorblaster/siren"
Expand Down
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
extern crate serde_derive;
extern crate clap;

use std::error::Error;
use std::fs::File;
use std::io::Error as IoError;
use std::io::Read;
Expand Down Expand Up @@ -61,7 +60,7 @@ fn main() {
let configstring = match read_sirenfile(sirenfile_path) {
Ok(jsoncontent) => jsoncontent,
Err(err) => {
println!("Error! {}", err.description());
println!("Error! Probably Sirenfile is missing\n{}", err.to_string());
String::new()
}
};
Expand Down
3 changes: 1 addition & 2 deletions src/parse_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ fn configparse(confstring: String) -> Result<Config, Error> {
}

pub fn string_to_config(confstring: String) -> Config {
use std::error::Error;
let configuration = match configparse(confstring) {
Ok(c) => c,
Err(err) => {
println!("{}", err.description());
println!("Error parsing Sirenfile!\n{}", err.to_string());
Config {
switch_cwd: false,
tasks: Vec::new(),
Expand Down

0 comments on commit 2e58e72

Please sign in to comment.