diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-10-06 09:19:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-10-06 09:19:52 +0300 |
commit | 52e01eb6a847dcbffdfc6a2464d23b3fcabfb76c (patch) | |
tree | 13c610d3da8ac068e9f75f7b0e9c1d2db71f54f8 /src | |
parent | 0f28bb642c3222bde22135163b201ab1d65b5059 (diff) | |
download | cachedir-rs-52e01eb6a847dcbffdfc6a2464d23b3fcabfb76c.tar.gz |
fix: formatting
Sponsored-by: author
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/cachedir.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/cachedir.rs b/src/bin/cachedir.rs index 965a14d..dd4a724 100644 --- a/src/bin/cachedir.rs +++ b/src/bin/cachedir.rs @@ -14,8 +14,8 @@ use cachedir::{is_cachedir_tag, CacheDirError, CACHEDIR_TAG, TAG}; use clap::{Parser, Subcommand}; -use std::fs::{remove_file, write}; use std::error::Error; +use std::fs::{remove_file, write}; use std::path::PathBuf; use walkdir::{DirEntry, WalkDir}; @@ -23,8 +23,7 @@ pub fn is_cachedir_tag(filename: &Path) -> Result<bool, CacheDirError> { } // Does the file start with the right prefix? - let data = read(filename) - .map_err(|e| CacheDirError::Read(filename.into(), e))?; + let data = read(filename).map_err(|e| CacheDirError::Read(filename.into(), e))?; if data.len() >= TAG.len() { Ok(&data[..TAG.len()] == TAG.as_bytes()) } else { |