Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outcome assertion added #8

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Outcome assertion added #8

merged 3 commits into from
Sep 4, 2024

Conversation

lvn-hasky-dragon
Copy link
Contributor

No description provided.

Base automatically changed from tests to main September 4, 2024 14:09
Copy link

cloudflare-workers-and-pages bot commented Sep 4, 2024

Deploying levana-predict with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8a53688
Status: ✅  Deploy successful!
Preview URL: https://86f4b1d2.levana-predict.pages.dev
Branch Preview URL: https://assert-add.levana-predict.pages.dev

View logs

@@ -104,6 +104,8 @@ fn add_market(
});
}

assert!(outcomes.len() == 2, "Supports only two outcomes");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to make this a runtime check as part of the production runtime, returning an error message instead of just panicking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agree. Updated.

@lvn-rusty-dragon lvn-rusty-dragon merged commit 48d7c3e into main Sep 4, 2024
2 checks passed
@lvn-rusty-dragon lvn-rusty-dragon deleted the assert-add branch September 4, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants