We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 825ab84 commit fc7280aCopy full SHA for fc7280a
src/coding-guidelines/unsafety.rst
@@ -43,8 +43,8 @@ Unsafety
43
44
.. code-block:: rust
45
46
- mod bad {
47
- fn get_value(data: &[i32], index: usize) -> i32 {
+ pub mod bad {
+ pub fn get_value(data: &[i32], index: usize) -> i32 {
48
unsafe {
49
data.get_unchecked(usize)
50
}
@@ -60,8 +60,8 @@ Unsafety
60
61
62
63
- mod good {
64
+ pub mod good {
65
assert!(usize < data.len());
66
67
0 commit comments