Skip to content

Commit 421969b

Browse files
committed
Removed unused parameters
1 parent 8c197cd commit 421969b

5 files changed

+8
-8
lines changed

Diff for: commands/service_library_install.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func LibraryInstall(ctx context.Context, req *rpc.LibraryInstallRequest, downloa
5151
return err
5252
}
5353

54-
res, err := libraryResolveDependencies(ctx, lme, li, req.GetName(), req.GetVersion(), req.GetNoOverwrite())
54+
res, err := libraryResolveDependencies(lme, li, req.GetName(), req.GetVersion(), req.GetNoOverwrite())
5555
releaseLme()
5656
if err != nil {
5757
return err

Diff for: commands/service_library_resolve_deps.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ func LibraryResolveDependencies(ctx context.Context, req *rpc.LibraryResolveDepe
4242
return nil, err
4343
}
4444

45-
return libraryResolveDependencies(ctx, lme, li, req.GetName(), req.GetVersion(), req.GetDoNotUpdateInstalledLibraries())
45+
return libraryResolveDependencies(lme, li, req.GetName(), req.GetVersion(), req.GetDoNotUpdateInstalledLibraries())
4646
}
4747

48-
func libraryResolveDependencies(ctx context.Context, lme *librariesmanager.Explorer, li *librariesindex.Index,
48+
func libraryResolveDependencies(lme *librariesmanager.Explorer, li *librariesindex.Index,
4949
reqName, reqVersion string, noOverwrite bool) (*rpc.LibraryResolveDependenciesResponse, error) {
5050
version, err := ParseVersion(reqVersion)
5151
if err != nil {

Diff for: commands/service_platform_uninstall.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
// PlatformUninstall FIXMEDOC
2828
func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallRequest, taskCB rpc.TaskProgressCB) (*rpc.PlatformUninstallResponse, error) {
29-
if err := platformUninstall(ctx, req, taskCB); err != nil {
29+
if err := platformUninstall(req, taskCB); err != nil {
3030
return nil, err
3131
}
3232
if err := Init(&rpc.InitRequest{Instance: req.GetInstance()}, nil); err != nil {
@@ -36,7 +36,7 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallRequest, t
3636
}
3737

3838
// platformUninstall is the implementation of platform unistaller
39-
func platformUninstall(ctx context.Context, req *rpc.PlatformUninstallRequest, taskCB rpc.TaskProgressCB) error {
39+
func platformUninstall(req *rpc.PlatformUninstallRequest, taskCB rpc.TaskProgressCB) error {
4040
pme, release, err := instances.GetPackageManagerExplorer(req.GetInstance())
4141
if err != nil {
4242
return &cmderrors.InvalidInstanceError{}

Diff for: commands/service_upload.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func runProgramAction(pme *packagemanager.Explorer,
371371
}
372372

373373
if !burnBootloader {
374-
importPath, sketchName, err := determineBuildPathAndSketchName(importFile, importDir, sk, fqbn)
374+
importPath, sketchName, err := determineBuildPathAndSketchName(importFile, importDir, sk)
375375
if err != nil {
376376
return nil, &cmderrors.NotFoundError{Message: tr("Error finding build artifacts"), Cause: err}
377377
}
@@ -674,7 +674,7 @@ func runTool(recipeID string, props *properties.Map, outStream, errStream io.Wri
674674
return nil
675675
}
676676

677-
func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sketch, fqbn *cores.FQBN) (*paths.Path, string, error) {
677+
func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sketch) (*paths.Path, string, error) {
678678
// In general, compiling a sketch will produce a set of files that are
679679
// named as the sketch but have different extensions, for example Sketch.ino
680680
// may produce: Sketch.ino.bin; Sketch.ino.hex; Sketch.ino.zip; etc...

Diff for: commands/service_upload_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) {
109109
}
110110
for i, test := range tests {
111111
t.Run(fmt.Sprintf("SubTest%02d", i), func(t *testing.T) {
112-
buildPath, sketchName, err := determineBuildPathAndSketchName(test.importFile, test.importDir, test.sketch, test.fqbn)
112+
buildPath, sketchName, err := determineBuildPathAndSketchName(test.importFile, test.importDir, test.sketch)
113113
if test.resBuildPath == "<nil>" {
114114
require.Error(t, err)
115115
require.Nil(t, buildPath)

0 commit comments

Comments
 (0)