Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/device: remove unnecessary type parameter #123

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/device/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading