[#47] fixed some doc and code inconsistencies and removed some redundant parentheses

This commit is contained in:
Valley
2022-07-10 14:13:44 +08:00
committed by GitHub
parent d64fbf9011
commit 460c684caa
9 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -148,12 +148,12 @@ func (s *Settings) Merge(other *Settings) error {
}
// Clone creates a new deep copy of the current settings.
func (c *Settings) Clone() (*Settings, error) {
new := &Settings{}
if err := new.Merge(c); err != nil {
func (s *Settings) Clone() (*Settings, error) {
settings := &Settings{}
if err := settings.Merge(s); err != nil {
return nil, err
}
return new, nil
return settings, nil
}
// RedactClone creates a new deep copy of the current settings,