fix(content): make rm use our own Error

This commit is contained in:
Kat Marchán 2019-06-05 13:40:56 +02:00
parent 815d7a3c9e
commit f3b6abf45c
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 8 additions and 5 deletions

View File

@ -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(())
}