File tree Expand file tree Collapse file tree 4 files changed +20
-18
lines changed
portable-simd/crates/core_simd/examples Expand file tree Collapse file tree 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+
45use crate :: alloc:: { self , Layout , LayoutError } ;
56use core:: error:: Error ;
67use 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`.
43
54#![ feature( array_chunks) ]
65#![ 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+
1112use crate :: cmp;
1213use crate :: io:: { self , BorrowedBuf , Read } ;
1314use 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+
34use crate :: borrow:: Cow ;
45use crate :: collections:: TryReserveError ;
56use crate :: fmt;
You can’t perform that action at this time.
0 commit comments