Skip to content

Commit a02244d

Browse files
zulinx86alxiord
authored andcommitted
docs: fix sample code in docs
Fix a typo and an incorrect root version in docs. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent e00a8b5 commit a02244d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/version_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
//! assert_eq!(version_map.get_type_version(1, State::type_id()), 1);
4949
//!
5050
//!
51-
//! // Check that root version 2 has Struct1 at version 2 and Struct 2
51+
//! // Check that root version 2 has Struct1 at version 2 and Struct2
5252
//! // at version 1.
5353
//! assert_eq!(version_map.get_type_version(2, Struct1::type_id()), 2);
5454
//! assert_eq!(version_map.get_type_version(2, Struct2::type_id()), 1);
55-
//! assert_eq!(version_map.get_type_version(1, State::type_id()), 1);
55+
//! assert_eq!(version_map.get_type_version(2, State::type_id()), 1);
5656
//!
5757
//! // Check that root version 3 has Struct1 and Struct2 at version 2.
5858
//! assert_eq!(version_map.get_type_version(3, Struct1::type_id()), 2);

0 commit comments

Comments
 (0)