From f3b6abf45c0408228e3bf8a0fe1e744d0b32c0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 5 Jun 2019 13:40:56 +0200 Subject: [PATCH] fix(content): make rm use our own Error --- src/content/rm.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/content/rm.rs b/src/content/rm.rs index 3081cdc..c4c9a21 100644 --- a/src/content/rm.rs +++ b/src/content/rm.rs @@ -1,9 +1,12 @@ -use crate::content::path; -use ssri::Integrity; -use std::io; use std::fs; use std::path::Path; -pub fn rm(cache: &Path, sri: &Integrity) -> io::Result<()> { - fs::remove_file(path::content_path(&cache, &sri)) +use ssri::Integrity; + +use crate::content::path; +use crate::errors::Error; + +pub fn rm(cache: &Path, sri: &Integrity) -> Result<(), Error> { + fs::remove_file(path::content_path(&cache, &sri))?; + Ok(()) }