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