E1845: documentation promises that a result cannot fail
A public verb returns a Result, and its docstring says that it always succeeds (ADR-0041).
A public verb returns a Result, and its docstring says that it always
succeeds (ADR-0041). A Result has an Err variant, so the type cannot
guarantee that, and the documentation would promise behavior that the verb
does not give. The check looks for always succeeds, never fails, cannot fail and no errors. The message is documentation promises behavior that the declared result contract cannot guarantee, naming the declaration, and
the error points at the declaration.
Example
Fix
Document the Err variants and the conditions that produce them. If the verb
cannot fail, return the value itself instead of a Result.
Run actus explain E1845 in your terminal to read this entry offline. Browse Strict & toolchain or all error codes.