Skip to content

Commit

Permalink
lint: fix several rust2024 compat issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jwong101 committed Nov 6, 2024
1 parent 0ed5c35 commit 08655b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/forge_analyzer/src/interp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,11 +904,11 @@ impl<'cx, C: Runner<'cx>> Interp<'cx, C> {
pub fn callees(
&self,
caller: DefId,
) -> impl DoubleEndedIterator<Item = (DefId, Location)> + '_ {
) -> impl DoubleEndedIterator<Item = (DefId, Location)> + use<'_, C> {
self.call_graph
.callgraph
.range((caller, DefId::new(0))..(caller, DefId::new(u32::MAX)))
.map(|(&(_, callee), &loc)| (callee, loc))
.map(move |(&(_, callee), &loc)| (callee, loc))
}

fn run(&mut self, func_def: DefId) {
Expand Down
4 changes: 2 additions & 2 deletions crates/forge_analyzer/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ impl Body {
}

Check warning on line 362 in crates/forge_analyzer/src/ir.rs

View workflow job for this annotation

GitHub Actions / Rustfmt

Diff in /home/runner/work/FSRT/FSRT/crates/forge_analyzer/src/ir.rs

#[inline]
pub(crate) fn iter_cfg_enumerated(&self) -> impl Iterator<Item = (u32, u32)> {
self.build_cfg_vec().into_iter()
pub(crate) fn iter_cfg_enumerated(&self) -> impl IntoIterator<Item = (u32, u32)> + 'static + use<> {
self.build_cfg_vec()
}

pub(crate) fn iter_block_keys(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub fn get_permisions_for(
endpoint_map_classic: &mut PermissionHashMap,
endpoint_regex: &mut HashMap<String, Regex>,
) {
#[allow(if_let_rescope)]

Check failure on line 112 in crates/forge_permission_resolver/src/permissions_resolver.rs

View workflow job for this annotation

GitHub Actions / Clippy

unknown lint: `if_let_rescope`

Check failure on line 112 in crates/forge_permission_resolver/src/permissions_resolver.rs

View workflow job for this annotation

GitHub Actions / Linux Tester

unknown lint: `if_let_rescope`
if let Result::Ok(response) = ureq::get(url).call() {
let data: SwaggerReponse = response.into_json().unwrap();
for (key, endpoint_data) in &data.paths {
Expand Down

0 comments on commit 08655b8

Please sign in to comment.