Skip to content

Commit

Permalink
fix: fix error handling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 4, 2021
1 parent 6eaa473 commit 21b1879
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ exclude = [
]

[dependencies]
failure = "0.1.8"

lazy_static = "1.4.0"

# time format
Expand Down
4 changes: 2 additions & 2 deletions src/app/analysis/cloc_analysis.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::domain::cloc::{ClocDetail, ClocLanguage};
use crate::infrastructure::cloc;
use std::error::Error;
use failure::Error;
use std::path::{Path, PathBuf};

pub fn analysis(path: PathBuf) -> Vec<ClocLanguage> {
Expand All @@ -22,7 +22,7 @@ pub fn analysis(path: PathBuf) -> Vec<ClocLanguage> {
comments: report.stats.comments,
file_name,
path: strip_path.to_str().unwrap().to_string(),
bytes: file_size(strip_path).unwrap(),
bytes: file_size(&report.name).unwrap(),
});
}

Expand Down

0 comments on commit 21b1879

Please sign in to comment.