Skip to content

Commit 0056126

Browse files
committed
Replace expect by ?
1 parent 604d032 commit 0056126

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

asyncgit/src/error.rs

+12
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ pub enum Error {
123123
#[from] Box<gix::repository::diff_resource_cache::Error>,
124124
),
125125

126+
///
127+
#[error("gix::repository::commit_graph_if_enabled error: {0}")]
128+
GixRepositoryCommitGraphIfEnabled(
129+
#[from] gix::repository::commit_graph_if_enabled::Error,
130+
),
131+
132+
///
133+
#[error("gix::config::diff::algorithm error: {0}")]
134+
GixConfigDiffAlgorithm(
135+
#[from] gix::config::diff::algorithm::Error,
136+
),
137+
126138
///
127139
#[error("gix_blame error: {0}")]
128140
GixBlame(#[from] gix_blame::Error),

asyncgit/src/sync/blame.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ pub fn blame_file(
6262
};
6363

6464
let cache: Option<gix::commitgraph::Graph> =
65-
repo.commit_graph_if_enabled().expect("TODO");
65+
repo.commit_graph_if_enabled()?;
6666
let mut resource_cache =
6767
repo.diff_resource_cache_for_tree_diff()?;
6868

69-
let diff_algorithm = repo.diff_algorithm().expect("TODO");
69+
let diff_algorithm = repo.diff_algorithm()?;
7070

7171
let options = gix_blame::Options {
7272
diff_algorithm,

0 commit comments

Comments
 (0)