Skip to content

Commit

Permalink
chore: Fix clippy lints (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim authored Jan 10, 2025
1 parent 560b256 commit 6c9327c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fn symbolicate_stacktrace(
|frame: &SymbolicatedFrame| frame.raw.function.as_deref() == Some("_start");
if status == FrameStatus::UnknownImage
&& unsymbolicated_frames_iter.peek().is_none()
&& symbolicated_frames.last().map_or(false, is_start)
&& symbolicated_frames.last().is_some_and(is_start)
{
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/symbolicator-service/src/download/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl DownloadService {
&& self
.host_deny_list
.as_ref()
.map_or(false, |deny_list| deny_list.is_blocked(&host))
.is_some_and(|deny_list| deny_list.is_blocked(&host))
{
metric!(counter("service.download.blocked") += 1, "source" => &source_metric_key);
return Err(CacheError::DownloadError(
Expand Down
2 changes: 1 addition & 1 deletion crates/symbolicator-service/src/utils/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn create_client(
.previous()
.last()
.and_then(|url| url.host_str())
.map_or(false, |host| host == "dev.azure.com");
.is_some_and(|host| host == "dev.azure.com");

if is_from_azure {
return attempt.stop();
Expand Down
8 changes: 4 additions & 4 deletions crates/symbolicli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl Payload {
}
}

async fn get_remote<'a>(client: &reqwest::Client, key: EventKey<'a>) -> Result<Self> {
async fn get_remote(client: &reqwest::Client, key: EventKey<'_>) -> Result<Self> {
tracing::info!("trying to resolve event remotely");
let event = remote::download_event(client, key).await?;
tracing::info!("event json file downloaded");
Expand Down Expand Up @@ -290,9 +290,9 @@ mod remote {
id: String,
}

pub async fn get_attached_minidump<'a>(
pub async fn get_attached_minidump(
client: &reqwest::Client,
key: EventKey<'a>,
key: EventKey<'_>,
) -> Result<Option<Url>> {
let EventKey {
base_url,
Expand Down Expand Up @@ -378,7 +378,7 @@ mod remote {
Ok(temp_file.into_temp_path())
}

pub async fn download_event<'a>(client: &reqwest::Client, key: EventKey<'a>) -> Result<Event> {
pub async fn download_event(client: &reqwest::Client, key: EventKey<'_>) -> Result<Event> {
let EventKey {
base_url,
org,
Expand Down
2 changes: 1 addition & 1 deletion crates/symsorter/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn sort_files(sort_config: &SortConfig, paths: Vec<PathBuf>) -> Result<(usize, u
.into_iter()
.flat_map(WalkDir::new)
.filter_map(Result::ok)
.filter(|entry| entry.metadata().ok().map_or(false, |x| x.is_file()))
.filter(|entry| entry.metadata().is_ok_and(|x| x.is_file()))
.par_bridge()
.map(|entry| {
let path = entry.path();
Expand Down
2 changes: 1 addition & 1 deletion crates/wasm-split/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn as_custom_section(section: &Section) -> Option<&CustomSection> {

/// Returns `true` if this section should be stripped.
fn is_strippable_section(section: &Section, strip_names: bool) -> bool {
as_custom_section(section).map_or(false, |section| match section {
as_custom_section(section).is_some_and(|section| match section {
CustomSection::Name(_) => strip_names,
other => other.name().starts_with(".debug_"),
})
Expand Down

0 comments on commit 6c9327c

Please sign in to comment.