Skip to content

Commit 5de8306

Browse files
committed
chore(code-style-guide): Add bad unwrap example for tests
1 parent 1c9a496 commit 5de8306

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/contributor/pages/code-style-guide.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,15 @@ fn deserialize() {
791791
let input: String = serde_yaml::from_str("my string").expect("input string must deserialize");
792792
assert_eq(&input, "my string");
793793
}
794+
----
795+
796+
====
797+
798+
[WARNING.code-rule,caption=Examples of incorrect code for this rule]
799+
====
794800
801+
[source,rust]
802+
----
795803
#[test]
796804
fn serialize() {
797805
let serialized = serde_yaml::to_string(&String::from("my string")).unwrap();

0 commit comments

Comments
 (0)