Use Self (#1795)
This commit is contained in:
parent
3461a7f291
commit
177bb682b8
@ -8,9 +8,9 @@ pub(crate) struct AssignmentResolver<'src: 'run, 'run> {
|
|||||||
|
|
||||||
impl<'src: 'run, 'run> AssignmentResolver<'src, 'run> {
|
impl<'src: 'run, 'run> AssignmentResolver<'src, 'run> {
|
||||||
pub(crate) fn resolve_assignments(
|
pub(crate) fn resolve_assignments(
|
||||||
assignments: &Table<'src, Assignment<'src>>,
|
assignments: &'run Table<'src, Assignment<'src>>,
|
||||||
) -> CompileResult<'src, ()> {
|
) -> CompileResult<'src, ()> {
|
||||||
let mut resolver = AssignmentResolver {
|
let mut resolver = Self {
|
||||||
stack: Vec::new(),
|
stack: Vec::new(),
|
||||||
evaluated: BTreeSet::new(),
|
evaluated: BTreeSet::new(),
|
||||||
assignments,
|
assignments,
|
||||||
|
@ -18,7 +18,7 @@ impl<'src, 'run> Evaluator<'src, 'run> {
|
|||||||
settings: &'run Settings<'run>,
|
settings: &'run Settings<'run>,
|
||||||
search: &'run Search,
|
search: &'run Search,
|
||||||
) -> RunResult<'src, Scope<'src, 'run>> {
|
) -> RunResult<'src, Scope<'src, 'run>> {
|
||||||
let mut evaluator = Evaluator {
|
let mut evaluator = Self {
|
||||||
scope: overrides,
|
scope: overrides,
|
||||||
assignments: Some(assignments),
|
assignments: Some(assignments),
|
||||||
config,
|
config,
|
||||||
@ -260,7 +260,7 @@ impl<'src, 'run> Evaluator<'src, 'run> {
|
|||||||
settings: &'run Settings,
|
settings: &'run Settings,
|
||||||
search: &'run Search,
|
search: &'run Search,
|
||||||
) -> RunResult<'src, (Scope<'src, 'run>, Vec<String>)> {
|
) -> RunResult<'src, (Scope<'src, 'run>, Vec<String>)> {
|
||||||
let mut evaluator = Evaluator {
|
let mut evaluator = Self {
|
||||||
assignments: None,
|
assignments: None,
|
||||||
scope: scope.child(),
|
scope: scope.child(),
|
||||||
search,
|
search,
|
||||||
@ -313,7 +313,7 @@ impl<'src, 'run> Evaluator<'src, 'run> {
|
|||||||
settings: &'run Settings,
|
settings: &'run Settings,
|
||||||
search: &'run Search,
|
search: &'run Search,
|
||||||
) -> Evaluator<'src, 'run> {
|
) -> Evaluator<'src, 'run> {
|
||||||
Evaluator {
|
Self {
|
||||||
assignments: None,
|
assignments: None,
|
||||||
scope: Scope::child(scope),
|
scope: Scope::child(scope),
|
||||||
search,
|
search,
|
||||||
|
@ -9,9 +9,9 @@ pub(crate) struct RecipeResolver<'src: 'run, 'run> {
|
|||||||
impl<'src: 'run, 'run> RecipeResolver<'src, 'run> {
|
impl<'src: 'run, 'run> RecipeResolver<'src, 'run> {
|
||||||
pub(crate) fn resolve_recipes(
|
pub(crate) fn resolve_recipes(
|
||||||
unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>,
|
unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>,
|
||||||
assignments: &Table<'src, Assignment<'src>>,
|
assignments: &'run Table<'src, Assignment<'src>>,
|
||||||
) -> CompileResult<'src, Table<'src, Rc<Recipe<'src>>>> {
|
) -> CompileResult<'src, Table<'src, Rc<Recipe<'src>>>> {
|
||||||
let mut resolver = RecipeResolver {
|
let mut resolver = Self {
|
||||||
resolved_recipes: Table::new(),
|
resolved_recipes: Table::new(),
|
||||||
unresolved_recipes,
|
unresolved_recipes,
|
||||||
assignments,
|
assignments,
|
||||||
|
Loading…
Reference in New Issue
Block a user