Преглед изворни кода

refactor store.go remove extra assignment

Xiang Li пре 12 година
родитељ
комит
4bf57537b5
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      store/store.go

+ 1 - 3
store/store.go

@@ -119,9 +119,7 @@ func (s *Store) Update(nodePath string, newValue string, expireTime time.Time, i
 		if n.IsDir() {
 			// if the node is a directory, we cannot update value
 			s.Stats.Inc(UpdateFail)
-
-			err := etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, index, term)
-			return nil, err
+			return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, index, term)
 		}
 
 		e.PrevValue = n.Value