Skip to content

Commit

Permalink
ref: Update deps and remove dead-stores (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem authored Oct 12, 2021
1 parent 654086c commit 328a681
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 85 deletions.
99 changes: 51 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/symbolicator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ipnetwork = "0.18.0"
jsonwebtoken = "7.2.0"
lazy_static = "1.4.0"
log = { version = "0.4.13", features = ["serde"] }
lru = "0.6.3"
lru = "0.7.0"
num_cpus = "1.13.0"
minidump = "0.3"
parking_lot = "0.11.1"
Expand Down
22 changes: 8 additions & 14 deletions crates/symbolicator/src/services/cficaches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ impl CfiCacheActor {

#[derive(Debug)]
pub struct CfiCacheFile {
object_type: ObjectType,
identifier: ObjectId,
scope: Scope,
data: ByteView<'static>,
// NOTE: ideally this would keep the ByteView it could receive via CacheItemRequest::load
// however we only use this file by opening it by filename from a subprocess. Until we can
// pass a filedescriptor to the subprocess instead of a filename there is no point in storing
// this ByteView and instead we only rely on the cache semantics of touching the mtime
// before returning a cache item to ensure the cleanup process will not remove this while
// we are using it.
features: ObjectFeatures,
status: CacheStatus,
path: CachePath,
Expand Down Expand Up @@ -200,9 +202,9 @@ impl CacheItemRequest for FetchCfiCacheInternal {

fn load(
&self,
scope: Scope,
_scope: Scope,
status: CacheStatus,
data: ByteView<'static>,
_data: ByteView<'static>,
path: CachePath,
) -> Self::Item {
let mut candidates = self.candidates.clone();
Expand All @@ -213,10 +215,6 @@ impl CacheItemRequest for FetchCfiCacheInternal {
);

CfiCacheFile {
object_type: self.request.object_type,
identifier: self.request.identifier.clone(),
scope,
data,
features: self.meta_handle.features(),
status,
path,
Expand Down Expand Up @@ -270,10 +268,6 @@ impl CfiCacheActor {
.await
}
None => Ok(Arc::new(CfiCacheFile {
object_type: request.object_type,
identifier: request.identifier,
scope: request.scope,
data: ByteView::from_slice(b""),
features: ObjectFeatures::default(),
status: CacheStatus::Negative,
path: CachePath::new(),
Expand Down
Loading

0 comments on commit 328a681

Please sign in to comment.