Logo

Programming-Idioms

History of Idiom 123 > diff from v32 to v33

Edit summary for version 33 by programming-idioms.org:
[Rust] Demo: remove clutter

Version 32

2021-03-26, 18:31:45

Version 33

2021-03-26, 18:38:09

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Variables
isConsistent
Variables
isConsistent
Extra Keywords
debug testing test
Extra Keywords
debug testing test
Code
assert!(is_consistent);
Code
assert!(is_consistent);
Doc URL
https://doc.rust-lang.org/std/macro.assert.html
Doc URL
https://doc.rust-lang.org/std/macro.assert.html
Demo URL
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b376cfd68c4d846b92338918488ebd2c
Demo URL
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f616f1696e9a0c0d6943b50b4bdb92b5