Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Allow plug-in to return a custom value in can_do() #130

Merged
merged 4 commits into from
Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ pub enum Supported {
Yes,
Maybe,
No,
Custom(isize),
}

impl Supported {
Expand All @@ -281,6 +282,7 @@ impl Into<isize> for Supported {
Yes => 1,
Maybe => 0,
No => -1,
Custom(i) => i,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ mod tests {

fn new(host: HostCallback) -> TestPlugin {
TestPlugin {
host: host
host
}
}

Expand Down