From 837e90b484aeca7d76e833d7457c2285331b0854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 24 May 2019 17:13:50 -0700 Subject: [PATCH] refactor(read): follow convention for imports --- src/content/read.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/read.rs b/src/content/read.rs index f3a6e1e..854c6b3 100644 --- a/src/content/read.rs +++ b/src/content/read.rs @@ -1,27 +1,27 @@ -use crate::content::path::content_path; +use crate::content::path; use ssri::Integrity; use std::path::Path; use std::fs::{self, File}; use std::io; pub fn open(cache: &Path, sri: &Integrity) -> io::Result { - File::open(content_path(&cache, &sri)) + File::open(path::content_path(&cache, &sri)) } pub fn read(cache: &Path, sri: &Integrity) -> io::Result> { - fs::read(content_path(&cache, &sri)) + fs::read(path::content_path(&cache, &sri)) } pub fn read_to_string(cache: &Path, sri: &Integrity) -> io::Result { - fs::read_to_string(content_path(&cache, &sri)) + fs::read_to_string(path::content_path(&cache, &sri)) } pub fn copy(cache: &Path, sri: &Integrity, to: &Path) -> io::Result { - fs::copy(content_path(&cache, &sri), to) + fs::copy(path::content_path(&cache, &sri), to) } pub fn has_content(cache: &Path, sri: &Integrity) -> Option { - if content_path(&cache, &sri).exists() { + if path::content_path(&cache, &sri).exists() { Some(sri.clone()) } else { None