From ff4ccb6eb0be9f37c795978ba7d416fb2ccdfdbd Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Tue, 6 Jun 2017 23:45:23 +0530 Subject: [PATCH] Remove unnecessary error from ToggleCompaction fns Signed-off-by: Goutham Veeramachaneni --- db.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/db.go b/db.go index 462a3060e..015e29d17 100644 --- a/db.go +++ b/db.go @@ -531,25 +531,21 @@ func (db *DB) Close() error { } // DisableCompactions disables compactions. -func (db *DB) DisableCompactions() error { +func (db *DB) DisableCompactions() { if db.compacting { db.cmtx.Lock() db.compacting = false db.logger.Log("msg", "compactions disabled") } - - return nil } // EnableCompactions enables compactions. -func (db *DB) EnableCompactions() error { +func (db *DB) EnableCompactions() { if !db.compacting { db.cmtx.Unlock() db.compacting = true db.logger.Log("msg", "compactions enabled") } - - return nil } // Snapshot writes the current data to the directory.