Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Jan 18, 2017
1 parent b4087f5 commit 01b46cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Outcome's API is heavily inspired and based up the Rust
`Option <https://doc.rust-lang.org/std/option/enum.Option.html>`_ and
`Result <https://doc.rust-lang.org/std/result/enum.Result.html>`_ types.

* `Option <#option>`_
* `Result <#result>`_
.. code-block:: lua
local outcome = require "outcome"
Option
Expand Down Expand Up @@ -52,7 +53,6 @@ A *Some* option can be created using the ``outcome.some()`` function.

.. code-block:: lua
local outcome = require "outcome"
local option = outcome.some("my value")
assert(option:isSome())
print(option:unwrap())
Expand All @@ -61,7 +61,6 @@ A *None* option can be created using the ``outcome.none()`` function.

.. code-block:: lua
local outcome = require "outcome"
local option = outcome.none()
assert(option:isNone())
print(option:unwrap()) -- << This will cause an error!
Expand All @@ -71,7 +70,6 @@ function. Outcome treats any ``nil`` value as a None.

.. code-block:: lua
local outcome = require "outcome"
local someOption = outcome.option("foo")
assert(option:isSome())
local noneOption = outcome.option(nil)
Expand Down

0 comments on commit 01b46cf

Please sign in to comment.