Skip to content

Commit 163a378

Browse files
committed
Mark TcpKeepalive methods as constant
1 parent fee0b20 commit 163a378

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl TcpKeepalive {
310310
///
311311
/// Some platforms specify this value in seconds, so sub-second
312312
/// specifications may be omitted.
313-
pub fn with_time(self, time: Duration) -> Self {
313+
pub const fn with_time(self, time: Duration) -> Self {
314314
Self {
315315
time: Some(time),
316316
..self
@@ -334,7 +334,7 @@ impl TcpKeepalive {
334334
windows,
335335
)
336336
))]
337-
pub fn with_interval(self, interval: Duration) -> Self {
337+
pub const fn with_interval(self, interval: Duration) -> Self {
338338
Self {
339339
interval: Some(interval),
340340
..self
@@ -354,7 +354,7 @@ impl TcpKeepalive {
354354
target_vendor = "apple",
355355
)
356356
))]
357-
pub fn with_retries(self, retries: u32) -> Self {
357+
pub const fn with_retries(self, retries: u32) -> Self {
358358
Self {
359359
retries: Some(retries),
360360
..self

0 commit comments

Comments
 (0)