Skip to content

Commit

Permalink
refactor: Remove inner Arc from FileCacheEntry (#16870)
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion authored Jun 11, 2024
1 parent 84e2ea4 commit 806feb5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/polars-io/src/file_cache/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ struct EntryData {
inner: Mutex<Inner>,
}

#[derive(Clone)]
pub struct FileCacheEntry(Arc<EntryData>);
pub struct FileCacheEntry(EntryData);

impl EntryMetadata {
fn matches_remote_metadata(&self, remote_metadata: &RemoteMetadata) -> bool {
Expand Down Expand Up @@ -267,7 +266,7 @@ impl FileCacheEntry {
"impl error: entry uri != file_fetcher uri"
);

Self(Arc::new(EntryData {
Self(EntryData {
uri: uri.clone(),
inner: Mutex::new(Inner {
uri,
Expand All @@ -277,7 +276,7 @@ impl FileCacheEntry {
cached_data: None,
file_fetcher,
}),
}))
})
}

pub fn uri(&self) -> Arc<str> {
Expand Down

0 comments on commit 806feb5

Please sign in to comment.