internal/app: filter ops in implementation
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m33s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m33s
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -75,17 +75,14 @@ func (k *outcome) finalise(ctx context.Context, msg message.Msg, id *state.ID, c
|
||||
EnvPaths: copyPaths(k.syscallDispatcher),
|
||||
Container: config.Container,
|
||||
}
|
||||
s.populateEarly(k.syscallDispatcher, msg, config)
|
||||
s.populateEarly(k.syscallDispatcher, msg)
|
||||
if err := s.populateLocal(k.syscallDispatcher, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sys := system.New(k.ctx, msg, s.uid.unwrap())
|
||||
stateSys := outcomeStateSys{config: config, sys: sys, outcomeState: &s}
|
||||
for _, op := range s.Shim.Ops {
|
||||
if err := op.toSystem(&stateSys); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := (&outcomeStateSys{config: config, sys: sys, outcomeState: &s}).toSystem(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
k.sys = sys
|
||||
|
||||
Reference in New Issue
Block a user