Better errors
This commit is contained in:
+2
-2
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user