Skip to content

Commit 2fcd7ab

Browse files
committed
make the local options cloneable
1 parent 9cc582b commit 2fcd7ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rs_lib/src/file_fetcher/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ pub struct FetchNoFollowOptions<'a> {
443443
pub maybe_cache_setting: Option<&'a CacheSetting>,
444444
}
445445

446-
#[derive(Debug, Default)]
446+
#[derive(Debug, Clone, Default)]
447447
pub struct FetchLocalOptions {
448448
pub include_mtime: bool,
449449
}
@@ -917,7 +917,7 @@ impl<TBlobStore: BlobStore, TSys: FileFetcherSys, THttpClient: HttpClient>
917917
path: &Path,
918918
options: &FetchLocalOptions,
919919
) -> std::io::Result<File> {
920-
let mut file = self.sys.fs_open(&path, &OpenOptions::new_read())?;
920+
let mut file = self.sys.fs_open(path, &OpenOptions::new_read())?;
921921
let mtime = if options.include_mtime {
922922
file.fs_file_metadata().and_then(|m| m.modified()).ok()
923923
} else {

rs_lib/src/local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl<TSys: LocalHttpCacheSys> HttpCache for LocalHttpCache<TSys> {
471471
self.global_cache.get(&global_key, maybe_checksum)?;
472472
if let Some(file) = maybe_global_cache_file {
473473
let content = self
474-
.transform_content_on_copy_to_local(&key.url, file.content);
474+
.transform_content_on_copy_to_local(key.url, file.content);
475475
atomic_write_file_with_retries(
476476
self.env(),
477477
&local_file_path,

0 commit comments

Comments
 (0)