Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed Oct 23, 2024
1 parent ff97ea7 commit 11d58ab
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
9 changes: 6 additions & 3 deletions scopegraphs/src/completeness/explicit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ impl<LABEL: Hash + Eq + Label, DATA> Completeness<LABEL, DATA> for ExplicitClose
}
}

type GetEdgesResult<'rslv> = EdgesOrDelay<Vec<Scope>, LABEL>
where
Self: 'rslv, LABEL: 'rslv, DATA: 'rslv;
type GetEdgesResult<'rslv>
= EdgesOrDelay<Vec<Scope>, LABEL>
where
Self: 'rslv,
LABEL: 'rslv,
DATA: 'rslv;

fn cmpl_get_edges<'rslv>(
&self,
Expand Down
7 changes: 6 additions & 1 deletion scopegraphs/src/completeness/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ impl<LABEL: Hash + Eq + Label + Copy, DATA> Completeness<LABEL, DATA>
.cmpl_new_edge(inner_scope_graph, src, lbl, dst)
}

type GetEdgesResult<'rslv> = FutureWrapper<'rslv, Vec<Scope>> where Self: 'rslv, LABEL: 'rslv, DATA: 'rslv;
type GetEdgesResult<'rslv>
= FutureWrapper<'rslv, Vec<Scope>>
where
Self: 'rslv,
LABEL: 'rslv,
DATA: 'rslv;

fn cmpl_get_edges<'rslv>(
&'rslv self,
Expand Down
9 changes: 6 additions & 3 deletions scopegraphs/src/completeness/implicit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ impl<LABEL: Hash + Eq + Label, DATA> Completeness<LABEL, DATA> for ImplicitClose
}
}

type GetEdgesResult<'rslv> = Vec<Scope>
where
Self: 'rslv, LABEL: 'rslv, DATA: 'rslv;
type GetEdgesResult<'rslv>
= Vec<Scope>
where
Self: 'rslv,
LABEL: 'rslv,
DATA: 'rslv;

fn cmpl_get_edges<'rslv>(
&self,
Expand Down
9 changes: 6 additions & 3 deletions scopegraphs/src/completeness/unchecked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ impl<LABEL: Hash + Eq, DATA> Completeness<LABEL, DATA> for UncheckedCompleteness
inner_scope_graph.add_edge(src, lbl, dst)
}

type GetEdgesResult<'rslv> = Vec<Scope>
where
Self: 'rslv, LABEL: 'rslv, DATA: 'rslv;
type GetEdgesResult<'rslv>
= Vec<Scope>
where
Self: 'rslv,
LABEL: 'rslv,
DATA: 'rslv;

fn cmpl_get_edges<'rslv>(
&self,
Expand Down
3 changes: 2 additions & 1 deletion scopegraphs/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ pub trait RenderScopeData {
self.render_node().is_some()
}

fn explicit_relabel(&self, scope_id: usize) -> Option<String> {
/// Allows you to relabel specific scope IDs, can be useful for documentation purposes.
fn explicit_relabel(&self, _scope_id: usize) -> Option<String> {
None
}
}
Expand Down
6 changes: 5 additions & 1 deletion scopegraphs/src/resolve/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ where
ResolvedPath<'sg, LABEL, DATA>: Hash + Eq,
Path<LABEL>: Clone,
{
type EnvContainer = EnvC<'sg, 'rslv, CMPL, LABEL, DATA> where 'sg: 'rslv, Self: 'rslv;
type EnvContainer
= EnvC<'sg, 'rslv, CMPL, LABEL, DATA>
where
'sg: 'rslv,
Self: 'rslv;

/// Entry point of lookup-based query resolution. Performs a traversal of the scope graph that
/// results in an environment containing all declarations matching a reference.
Expand Down
10 changes: 5 additions & 5 deletions scopegraphs/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,12 @@ impl<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>

impl<'storage, LABEL, DATA, CMPL> ScopeGraph<'storage, LABEL, DATA, CMPL> {
/// Build a query over the scope graph.
pub fn query<'sg>(
&'sg self,
pub fn query<'rslv>(
&'rslv self,
) -> Query<
'storage,
'sg,
'_,
'rslv,
'rslv,
LABEL,
DATA,
CMPL,
Expand All @@ -654,7 +654,7 @@ impl<'storage, LABEL, DATA, CMPL> ScopeGraph<'storage, LABEL, DATA, CMPL> {
DefaultDataEquivalence,
>
where
'storage: 'sg,
'storage: 'rslv,
{
Query {
_phantom: PhantomData,
Expand Down

0 comments on commit 11d58ab

Please sign in to comment.