Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ thiserror = "2.0.3"
tokio = { version = "1.44.2", features = ["rt-multi-thread", "macros", "signal", "sync"] }
tokio-stream = { version = "0.1.16", default-features = false }
tower = { version = "0.5.1", default-features = false }
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["std", "fmt"] }
tracing-subscriber = { version = "0.3.20", default-features = false, features = ["std", "fmt"] }
tempfile = "3.19.0"
tower-http = "0.6.2"
tracing = "0.1.41"
Expand Down
4 changes: 2 additions & 2 deletions crates/freighter-auth/src/fs_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl FsAuthProvider {
}
}

fn owners(&self) -> AuthResult<MappedRwLockReadGuard<Owners>> {
fn owners(&self) -> AuthResult<MappedRwLockReadGuard<'_, Owners>> {
let mut read_lock = self.owners.read();
loop {
if let Ok(loaded) = RwLockReadGuard::try_map(read_lock, |x| x.as_ref()) {
Expand All @@ -103,7 +103,7 @@ impl FsAuthProvider {
}
}

fn owners_mut(&self) -> AuthResult<MappedRwLockWriteGuard<Owners>> {
fn owners_mut(&self) -> AuthResult<MappedRwLockWriteGuard<'_, Owners>> {
RwLockWriteGuard::try_map(self.owners.write(), |x| x.as_mut()).or_else(|mut locked| {
*locked = Some(self.load_owners_file()?);
Ok(RwLockWriteGuard::map(locked, |x| x.as_mut().unwrap()))
Expand Down
6 changes: 2 additions & 4 deletions crates/freighter-fs-index/src/file_locks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ impl<T> AccessLocks<T> {
pub fn on_unlocked(&self, key: &str) {
let mut locks = self.locks.lock().unwrap();
// Can drop the entry in the shared hashtable after the last user is dropped
if let Some(entry) = locks.get_mut(key) {
if Weak::strong_count(entry) == 0 {
locks.remove(key);
}
if let Some(entry) = locks.get_mut(key) && Weak::strong_count(entry) == 0 {
locks.remove(key);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/freighter-storage/src/s3_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ impl S3StorageProvider {
.await;

// on 404, we return a different error variant
if let Err(SdkError::ServiceError(e)) = &resp {
if e.err().is_no_such_key() {
return Err(StorageError::NotFound);
}
if let Err(SdkError::ServiceError(e)) = &resp
&& e.err().is_no_such_key()
{
return Err(StorageError::NotFound);
}

let resp = resp.context("Storage response error")?;
Expand Down
Loading