Skip to content

Commit

Permalink
Fix unused code warnings. (hypermodeinc#4849)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Feb 25, 2020
1 parent 84f18fd commit 8c70475
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion dgraph/cmd/counter/increment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
)

const N = 10
const pred = "counter"

func incrementInLoop(t *testing.T, dg *dgo.Dgraph, M int) int {
conf := viper.New()
Expand Down
4 changes: 0 additions & 4 deletions graphql/admin/draining.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ type drainingResolver struct {
enable bool
}

type drainingInput struct {
Enable bool
}

func (dr *drainingResolver) Rewrite(
m schema.Mutation) (*gql.GraphQuery, []*dgoapi.Mutation, error) {
glog.Info("Got draining request through GraphQL admin API")
Expand Down
24 changes: 0 additions & 24 deletions types/s2index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ func TestIndexCellsPoint(t *testing.T) {
require.Equal(t, c.ToToken(), "808fb9f81")
}

func printCells(cu s2.CellUnion) {
for _, c := range cu {
cell := s2.CellFromCellID(c)
area := EarthArea(cell.ExactArea())
r := cell.RectBound()
top := r.Vertex(0).Distance(r.Vertex(1))
side := r.Vertex(1).Distance(r.Vertex(2))
fmt.Printf("Level: %d, Cell: %s, area: %s, boundary: %s x %s\n", c.Level(), c.ToToken(),
area, EarthDistance(top), EarthDistance(side))
}
}

func TestIndexCellsPolygon(t *testing.T) {
p, err := loadPolygon("testdata/zip.json")
require.NoError(t, err)
Expand Down Expand Up @@ -155,18 +143,6 @@ func TestKeyGeneratorPolygon(t *testing.T) {
require.Len(t, keys, 67)
}

func testCover(file string, max int) {
fmt.Printf("Testing %s with max %d\n", file, max)
p, err := loadPolygon(file)
if err != nil {
return
}
l, _ := loopFromPolygon(p.(*geom.Polygon))
cu := coverLoop(l, MinCellLevel, MaxCellLevel, max)
printCells(cu)
printCoverAccuracy(l, cu)
}

func printCoverAccuracy(l *s2.Loop, cu s2.CellUnion) {
a1 := cellUnionArea(cu)
a2 := l.Area()
Expand Down

0 comments on commit 8c70475

Please sign in to comment.