diff --git a/README.md b/README.md index beb60f3..de0f9d2 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,13 @@ error handling **on steroids**. ## Features -* ApiResult is **lightweight**. The library tries to inline operators and reduce allocations where possible. +* ApiResult is **lightweight**. The library creates no objects, makes no allocations or virtual function resolutions. + Most of the code is inlined. * ApiResult offers 90+ operators covering most of possible use cases to turn your code from imperative and procedural to declarative and functional, which is more readable and extensible. * ApiResult defines a contract that you can use in your code. No one will be able to obtain the result of a computation without being forced to handle errors at compilation time. +* The library has 129 tests for 92% operator coverage. ## Preview diff --git a/docs/quickstart.md b/docs/quickstart.md index cd96a14..c103e6d 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -175,13 +175,12 @@ interface Repository { } val subscriptions: ApiResult> = ApiResult { - val verificationResult = repo.verifyDevice() - // bang (!) operator throws Errors, equivalent to binding // if bang does not throw, the device is verified - !verificationResult + val verificationResult = !repo.verifyDevice() - val user: User = !userRepository.getUser() // if bang does not throw, user is logged in + // if bang does not throw, user is logged in + val user: User = !userRepository.getUser() !repo.getSubscriptions(user) }