Skip to content

Commit c74eec7

Browse files
Apply suggestions from code review
Co-authored-by: Lokathor <[email protected]>
1 parent 0f837a9 commit c74eec7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

crates/core_simd/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(repr_simd)]
2-
2+
#![warn(missing_docs)]
33
#[macro_use]
44
mod macros;
55

crates/core_simd/src/macros.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ macro_rules! define_type {
6969

7070
// splat
7171
impl From<$type> for $name {
72+
#[inline]
7273
fn from(value: $type) -> Self {
7374
Self::splat(value)
7475
}
@@ -126,16 +127,16 @@ macro_rules! define_type {
126127
pub struct $name($($itype),*);
127128

128129
impl $name {
129-
/// Construct a vector by setting each lane to a single value.
130+
/// Construct a vector by setting all lanes to the given value.
130131
#[inline]
131-
pub fn splat(value: $type) -> Self {
132+
pub const fn splat(value: $type) -> Self {
132133
Self($(value as $itype),*)
133134
}
134135

135-
/// Construct a vector by setting each lane.
136+
/// Construct a vector by setting each lane to the given values.
136137
#[allow(clippy::too_many_arguments)]
137138
#[inline]
138-
pub fn new($($ivar: $itype),*) -> Self {
139+
pub const fn new($($ivar: $itype),*) -> Self {
139140
Self($($ivar),*)
140141
}
141142
}

0 commit comments

Comments
 (0)