partial_function

[Done] Partial Function library for Rust.
git clone https://git.jojolepro.com/partial_function.git
Log | Files | Refs | README | LICENSE

commit 88acc6800a03fa8cc7fe26cb851793242c97c9b3
parent d2cd8700a40b7e24d80138c5eacc35ac7cdc291d
Author: Joël Lupien (Jojolepro) <jojolepromain@gmail.com>
Date:   Wed,  8 Aug 2018 22:44:30 -0400

tried stuff, and failed

Diffstat:
M.idea/workspace.xml | 8++++----
Msrc/lib.rs | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.idea/workspace.xml b/.idea/workspace.xml @@ -17,8 +17,8 @@ <file leaf-file-name="lib.rs" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/lib.rs"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="444"> - <caret line="177" column="61" selection-start-line="177" selection-start-column="61" selection-end-line="177" selection-end-column="61" /> + <state relative-caret-position="633"> + <caret line="146" column="40" selection-start-line="146" selection-start-column="40" selection-end-line="146" selection-end-column="40" /> <folding> <element signature="e#4155#4156#0" expanded="true" /> <element signature="e#4204#4205#0" expanded="true" /> @@ -268,8 +268,8 @@ </entry> <entry file="file://$PROJECT_DIR$/src/lib.rs"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="444"> - <caret line="177" column="61" selection-start-line="177" selection-start-column="61" selection-end-line="177" selection-end-column="61" /> + <state relative-caret-position="633"> + <caret line="146" column="40" selection-start-line="146" selection-start-column="40" selection-end-line="146" selection-end-column="40" /> <folding> <element signature="e#4155#4156#0" expanded="true" /> <element signature="e#4204#4205#0" expanded="true" /> diff --git a/src/lib.rs b/src/lib.rs @@ -144,7 +144,7 @@ where /// Evaluates the partial function. /// Returns None if no function is defined for the searched invariable value (x). - pub fn eval(&self, x: B) -> Option<O> { + pub fn eval(&self, x: B) -> Option<&O> { let iter = self.funcs.iter().enumerate(); for (i, bounded) in iter { let next = self.funcs.get(i + 1);