Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
AZWN committed Oct 30, 2024
1 parent ca5254d commit 675da40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions scopegraphs/src/containers/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ where
let sub_env = sub_env.clone();
sub_env.into_iter().try_fold(
Env::new(),
|mut filtered_env: Env<'sg, LABEL, DATA>,
p1: ResolvedPath<'sg, LABEL, DATA>| {
|mut filtered_env: Env<'sg, LABEL, DATA>, p1: ResolvedPath<'sg, LABEL, DATA>| {
let shadowed = base_env.iter().try_fold(
/* initially, not shadowed */ false,
|previously_shadowed: bool, p2: &ResolvedPath<'sg, LABEL, DATA>| {
Expand Down
2 changes: 1 addition & 1 deletion scopegraphs/src/containers/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use futures::future::join_all;
use std::fmt::Debug;
use std::hash::Hash;

use super::{Injectable, Filterable};
use super::{Filterable, Injectable};

/// Interface for path containers that support the operations required for query resolution.
pub trait PathContainer<'sg, 'rslv, LABEL: 'sg, DATA: 'sg>: Debug + 'rslv {
Expand Down
15 changes: 8 additions & 7 deletions scopegraphs/src/resolve/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use std::sync::Arc;

use crate::completeness::Completeness;
use crate::containers::{
EnvContainer, Injectable, PathContainer, PathContainerWf, ScopeContainer, ScopeContainerWf,
Filterable,
EnvContainer, Filterable, Injectable, PathContainer, PathContainerWf, ScopeContainer,
ScopeContainerWf,
};
use crate::resolve::{
DataEquivalence, DataWellformedness, EdgeOrData, LabelOrder, Path, Query, Resolve, ResolvedPath,
Expand Down Expand Up @@ -227,11 +227,12 @@ where
let mut base_env = base_env.clone();
let sub_env = local_self.resolve_edge(path_wellformedness.clone(), edge, path);
sub_env.flat_map(move |sub_env| {
let merged_env: EnvC<'sg, 'rslv, CMPL, LABEL, DATA, DWF::Output, DEq::Output> = Filterable::filter(&base_env, sub_env, local_self.data_equiv);
merged_env.flat_map(move |merged_env| {
base_env.merge(merged_env);
base_env.into()
})
let filtered_env: EnvC<'sg, 'rslv, CMPL, LABEL, DATA, DWF::Output, DEq::Output> =
Filterable::filter(&base_env, sub_env, local_self.data_equiv);
filtered_env.flat_map(move |filtered_env| {
base_env.merge(filtered_env);
base_env.into()
})
})
}
}))
Expand Down
3 changes: 1 addition & 2 deletions scopegraphs/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ where
}
}

impl<'sg, LABEL: 'sg, DATA> FromIterator<ResolvedPath<'sg, LABEL, DATA>>
for Env<'sg, LABEL, DATA>
impl<'sg, LABEL: 'sg, DATA> FromIterator<ResolvedPath<'sg, LABEL, DATA>> for Env<'sg, LABEL, DATA>
where
ResolvedPath<'sg, LABEL, DATA>: Eq + Hash,
{
Expand Down

0 comments on commit 675da40

Please sign in to comment.