Skip to content

Commit

Permalink
Make clippy happy vol. 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Nov 3, 2022
1 parent 1cca281 commit b7d1a3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sentry-core/src/hub.rs
Expand Up @@ -42,12 +42,12 @@ pub(crate) struct HubImpl {
impl HubImpl {
pub(crate) fn with<F: FnOnce(&Stack) -> R, R>(&self, f: F) -> R {
let guard = self.stack.read().unwrap_or_else(PoisonError::into_inner);
f(&*guard)
f(&guard)
}

fn with_mut<F: FnOnce(&mut Stack) -> R, R>(&self, f: F) -> R {
let mut guard = self.stack.write().unwrap_or_else(PoisonError::into_inner);
f(&mut *guard)
f(&mut guard)
}

fn is_active_and_usage_safe(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion sentry-core/src/profiling.rs
Expand Up @@ -241,7 +241,7 @@ fn get_profile_from_report(
timestamp: rep.timing.start_time,
transactions: vec![TransactionMetadata {
id: transaction.event_id,
name: transaction.name.clone().unwrap_or_else(|| "".to_string()),
name: transaction.name.clone().unwrap_or_default(),
trace_id,
relative_start_ns: 0,
relative_end_ns: transaction
Expand Down

0 comments on commit b7d1a3e

Please sign in to comment.