Skip to content

Commit 62d7103

Browse files
committed
Add minor documentation improvements.
1 parent 988575d commit 62d7103

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

lexical-parse-float/src/options.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,8 @@ impl OptionsBuilder {
653653
///
654654
/// # Panics
655655
///
656-
/// If the built options are not valid.
656+
/// If the built options are not valid. This should always
657+
/// be used within a const context to avoid panics at runtime.
657658
#[inline(always)]
658659
pub const fn build_strict(&self) -> Options {
659660
match self.build() {

lexical-parse-integer/src/options.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,15 @@ impl OptionsBuilder {
131131
}
132132
}
133133

134-
/// Build the [`Options`] struct. This can never panic.
134+
/// Build the [`Options`] struct.
135+
///
136+
/// This can never panic.
137+
///
138+
/// <!-- # Panics
139+
///
140+
/// If the built options are not valid. This should always
141+
/// be used within a const context to avoid panics at runtime.
142+
/// -->
135143
#[inline(always)]
136144
pub const fn build_strict(&self) -> Options {
137145
match self.build() {

lexical-util/src/format_builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,8 @@ impl NumberFormatBuilder {
32773277
///
32783278
/// # Panics
32793279
///
3280-
/// If the built format is not valid.
3280+
/// If the built format is not valid. This should always
3281+
/// be used within a const context to avoid panics at runtime.
32813282
#[inline(always)]
32823283
pub const fn build_strict(&self) -> u128 {
32833284
use crate::format::format_error_impl;

lexical-write-float/src/options.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,8 @@ impl OptionsBuilder {
10141014
///
10151015
/// # Panics
10161016
///
1017-
/// If the built options are not valid.
1017+
/// If the built options are not valid. This should always
1018+
/// be used within a const context to avoid panics at runtime.
10181019
#[inline(always)]
10191020
pub const fn build_strict(&self) -> Options {
10201021
match self.build() {

lexical-write-integer/src/options.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,15 @@ impl OptionsBuilder {
7878
Options {}
7979
}
8080

81-
/// Build the [`Options`] struct. This can never panic.
81+
/// Build the [`Options`] struct.
82+
///
83+
/// This can never panic.
84+
///
85+
/// <!-- # Panics
86+
///
87+
/// If the built options are not valid. This should always
88+
/// be used within a const context to avoid panics at runtime.
89+
/// -->
8290
#[inline(always)]
8391
pub const fn build_strict(&self) -> Options {
8492
match self.build() {

0 commit comments

Comments
 (0)