File tree 4 files changed +20
-18
lines changed
portable-simd/crates/core_simd/examples
4 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1
- // Based on
2
- // https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs
3
- // by matthieu-m
1
+ //! Based on
2
+ //! <https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs>
3
+ //! by matthieu-m
4
+
4
5
use crate :: alloc:: { self , Layout , LayoutError } ;
5
6
use core:: error:: Error ;
6
7
use core:: fmt:: { self , Debug , Display , Formatter } ;
Original file line number Diff line number Diff line change 1
- // Code taken from the `packed_simd` crate
2
- // Run this code with `cargo test --example dot_product`
3
- //use std::iter::zip;
1
+ //! Code taken from the `packed_simd` crate.
2
+ //! Run this code with `cargo test --example dot_product`.
4
3
5
4
#![ feature( array_chunks) ]
6
5
#![ feature( slice_as_chunks) ]
Original file line number Diff line number Diff line change 1
- ///! An encapsulation of `BufReader`'s buffer management logic.
2
- ///
3
- /// This module factors out the basic functionality of `BufReader` in order to protect two core
4
- /// invariants:
5
- /// * `filled` bytes of `buf` are always initialized
6
- /// * `pos` is always <= `filled`
7
- /// Since this module encapsulates the buffer management logic, we can ensure that the range
8
- /// `pos..filled` is always a valid index into the initialized region of the buffer. This means
9
- /// that user code which wants to do reads from a `BufReader` via `buffer` + `consume` can do so
10
- /// without encountering any runtime bounds checks.
1
+ //! An encapsulation of `BufReader`'s buffer management logic.
2
+ //!
3
+ //! This module factors out the basic functionality of `BufReader` in order to protect two core
4
+ //! invariants:
5
+ //! * `filled` bytes of `buf` are always initialized
6
+ //! * `pos` is always <= `filled`
7
+ //! Since this module encapsulates the buffer management logic, we can ensure that the range
8
+ //! `pos..filled` is always a valid index into the initialized region of the buffer. This means
9
+ //! that user code which wants to do reads from a `BufReader` via `buffer` + `consume` can do so
10
+ //! without encountering any runtime bounds checks.
11
+
11
12
use crate :: cmp;
12
13
use crate :: io:: { self , BorrowedBuf , Read } ;
13
14
use crate :: mem:: MaybeUninit ;
Original file line number Diff line number Diff line change 1
- /// The underlying OsString/OsStr implementation on Windows is a
2
- /// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
1
+ //! The underlying OsString/OsStr implementation on Windows is a
2
+ //! wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
3
+
3
4
use crate :: borrow:: Cow ;
4
5
use crate :: collections:: TryReserveError ;
5
6
use crate :: fmt;
You can’t perform that action at this time.
0 commit comments