Skip to content

Commit

Permalink
refactor: Fixup un-used result warning
Browse files Browse the repository at this point in the history
  • Loading branch information
brianp committed Dec 11, 2019
1 parent c104abd commit 101bf98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion load/src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use yaml_rust::{Yaml, YamlLoader};
/// `project_name`: The name of the project, corresponding to the project config
/// file.
pub fn read(project_name: &str, project_paths: &ProjectPaths) -> Result<Vec<Yaml>, String> {
check_first_run(&project_paths.project_directory);
check_first_run(&project_paths.project_directory)?;

let mut file = File::open(&project_paths.project_file).map_err(|e| format!("No project configuration file was found with the name `{}` in the directory `{}`. Received error: {}", project_name, &project_paths.project_directory.display(), e.to_string()))?;
let mut contents = String::new();
Expand Down
2 changes: 1 addition & 1 deletion new/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static TEMPLATE: &str = include_str!("template.yml");
pub fn exec(args: Args) -> Result<(), String> {
let project_paths = project_paths(&args);

check_first_run(&project_paths.project_directory);
check_first_run(&project_paths.project_directory)?;

let template = modified_template(TEMPLATE, &project_paths.project_file);
write_template(&template, &project_paths.project_file).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion snapshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn exec(args: Args) -> Result<(), String> {
let session_name = &args.flag_t.as_ref().expect("No TMUX session running");
let project_paths = project_paths(&args);

check_first_run(&project_paths.project_directory);
check_first_run(&project_paths.project_directory)?;

let session = tmux::inspect(&session_name).unwrap();
let s = serde_yaml::to_string(&session).unwrap();
Expand Down

0 comments on commit 101bf98

Please sign in to comment.