From 7b48451ad4b0202e74aa1f13e246971297a65874 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Sun, 3 Nov 2024 18:24:12 +1030 Subject: [PATCH] internal/device: remove unnecessary type parameter --- internal/device/manager.go | 4 ++-- main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/device/manager.go b/internal/device/manager.go index 21fa88f..3bbbe05 100644 --- a/internal/device/manager.go +++ b/internal/device/manager.go @@ -26,7 +26,7 @@ import ( ) var ( - _ sys.NewDevice[*rpc.Kernel, *Manager, *Button] = NewManager[*rpc.Kernel] + _ sys.NewDevice[*rpc.Kernel, *Manager, *Button] = NewManager _ sys.Device[*Button] = (*Manager)(nil) _ sys.Page[*Button] = Page{} @@ -45,7 +45,7 @@ var kernelUID = rpc.UID{Module: "kernel", Service: "dev"} // NewManager returns a new device manager controlling the physical device // specified by pid and serial and communicating via the provided RPC kernel. -func NewManager[K sys.Kernel](ctx context.Context, pid ardilla.PID, serial string, kernel K, log *slog.Logger) (*Manager, error) { +func NewManager(ctx context.Context, pid ardilla.PID, serial string, kernel *rpc.Kernel, log *slog.Logger) (*Manager, error) { c, err := NewController(ctx, kernel, pid, serial, log) if err != nil { return nil, err diff --git a/main.go b/main.go index 64e23b9..d208b67 100644 --- a/main.go +++ b/main.go @@ -162,7 +162,7 @@ func Main() int { defer store.Close() sysman, err := sys.NewManager( - rpc.NewKernel, device.NewManager[*rpc.Kernel], + rpc.NewKernel, device.NewManager, store, datadir, log, &level, addSource) if err != nil { fmt.Fprintf(os.Stderr, "failed to start manager: %v\n", err)