core: do not use formatted error if not needed

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-07-12 12:31:40 +03:00
parent 96aa10bb80
commit bf871760c6

View file

@ -68,7 +68,7 @@ func ScopesFromString(s string) (WitnessScope, error) {
return result, fmt.Errorf("invalid witness scope: %v", scopeStr)
}
if isGlobal && !(scope == Global) {
return result, fmt.Errorf("Global scope can not be combined with other scopes")
return result, errors.New("Global scope can not be combined with other scopes")
}
result |= scope
if scope == Global {