Replace Fillable interface with a concrete wrapper
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
@@ -52,7 +52,7 @@ func (c *Component) ComputeScript() (*Script, error) {
|
||||
// 1. Always start with an empty fs state (Execute may receive any state as input)
|
||||
// 2. Always solve at the end (Execute is lazy)
|
||||
//
|
||||
func (c *Component) Compute(ctx context.Context, s Solver, out Fillable) (FS, error) {
|
||||
func (c *Component) Compute(ctx context.Context, s Solver, out *Fillable) (FS, error) {
|
||||
fs, err := c.Execute(ctx, s.Scratch(), out)
|
||||
if err != nil {
|
||||
return fs, err
|
||||
@@ -67,7 +67,7 @@ func (c *Component) Compute(ctx context.Context, s Solver, out Fillable) (FS, er
|
||||
// A component implements the Executable interface by returning its
|
||||
// compute script.
|
||||
// See Value.Executable().
|
||||
func (c *Component) Execute(ctx context.Context, fs FS, out Fillable) (FS, error) {
|
||||
func (c *Component) Execute(ctx context.Context, fs FS, out *Fillable) (FS, error) {
|
||||
script, err := c.ComputeScript()
|
||||
if err != nil {
|
||||
// If the component has no script, then do not fail.
|
||||
|
Reference in New Issue
Block a user