mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
remove duplication in solve.rs
This commit is contained in:
parent
6209adbd5c
commit
4ff06ebac5
1 changed files with 2 additions and 17 deletions
|
@ -138,24 +138,9 @@ pub fn run(
|
|||
mut subs: Subs,
|
||||
constraint: &Constraint,
|
||||
) -> (Solved<Subs>, Env) {
|
||||
let mut pools = Pools::default();
|
||||
let state = State {
|
||||
env: env.clone(),
|
||||
mark: Mark::NONE.next(),
|
||||
};
|
||||
let rank = Rank::toplevel();
|
||||
let state = solve(
|
||||
env,
|
||||
state,
|
||||
rank,
|
||||
&mut pools,
|
||||
problems,
|
||||
&mut MutMap::default(),
|
||||
&mut subs,
|
||||
constraint,
|
||||
);
|
||||
let env = run_in_place(env, problems, &mut subs, constraint);
|
||||
|
||||
(Solved(subs), state.env)
|
||||
(Solved(subs), env)
|
||||
}
|
||||
|
||||
/// Modify an existing subs in-place instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue