Better errors

This commit is contained in:
2022-10-20 01:28:11 +02:00
parent cbe7bc51a6
commit 4f38526dfb
9 changed files with 186 additions and 55 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ impl ActionExec for HashAction {
fn exec(&self, _config: &Config) -> Result<(), Error> {
// TODO errors
let hash = if self.torrent.starts_with("magnet:") {
magnet_hash(&self.torrent)
magnet_hash(&self.torrent)?
} else {
torrent_hash(&self.torrent)
torrent_hash(&self.torrent)?
};
println!("{}", hash);
Ok(())