Skip to content

Commit

Permalink
noop self
Browse files Browse the repository at this point in the history
  • Loading branch information
hyorigo committed Feb 23, 2024
1 parent d12115d commit 566dfc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 0 additions & 10 deletions dataconv/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ func (s *SharedDict) Get(k starlark.Value) (v starlark.Value, found bool, err er
return nil, false, nil

Check warning on line 93 in dataconv/share.go

View check run for this annotation

Codecov / codecov/patch

dataconv/share.go#L93

Added line #L93 was not covered by tests
}

func (s *SharedDict) Len() int {
s.RLock()
defer s.RUnlock()

if s.dict != nil {
return s.dict.Len()
}
return 0
}

func (s *SharedDict) SetKey(k, v starlark.Value) error {
s.Lock()
defer s.Unlock()
Expand Down
2 changes: 2 additions & 0 deletions dataconv/share_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ func TestSharedDict_Functions(t *testing.T) {
load('share', 'sd')
sd["foo"] = "bar"
assert.eq(sd.get("foo"), "bar")
assert.eq(sd.len(), 1)
sd.clear()
assert.eq(sd.get("foo"), None)
assert.eq(sd.len(), 0)
`),
},
{
Expand Down

0 comments on commit 566dfc2

Please sign in to comment.