Don't fail if we can't open the database

We make sure that even if there is no database file, we're still able
to return `None` for the alias lookup.
This commit is contained in:
Alexis Sellier
2023-07-12 11:37:20 +02:00
parent eb701be033
commit b27313bc5c
7 changed files with 22 additions and 25 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ pub fn run(
is_me.then(by_rev_time).then(by_id)
});
let aliases = profile.aliases()?;
let aliases = profile.aliases();
let mut errors = Vec::new();
for (id, patch) in &mut all {
@@ -132,7 +132,7 @@ pub fn timeline(
patch: &Patch,
repository: &Repository,
) -> anyhow::Result<Vec<term::Line>> {
let aliases = profile.aliases()?;
let aliases = profile.aliases();
let alias = aliases.alias(patch.author().id());
let open = term::Line::spaced([
term::format::positive("●").into(),