Skip to content

Commit 8086e6a

Browse files
robjtedeThomasdezeeuw
authored andcommitted
use unspecified wording in some docs
1 parent eda4ef6 commit 8086e6a

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/net/tcp/stream.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl TcpStream {
103103
///
104104
/// On Windows make sure the stream is connected before calling this method,
105105
/// by receiving an (writable) event. Trying to set `nodelay` on an
106-
/// unconnected `TcpStream` is undefined behavior.
106+
/// unconnected `TcpStream` is unspecified behavior.
107107
pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> {
108108
self.inner.set_nodelay(nodelay)
109109
}
@@ -118,7 +118,7 @@ impl TcpStream {
118118
///
119119
/// On Windows make sure the stream is connected before calling this method,
120120
/// by receiving an (writable) event. Trying to get `nodelay` on an
121-
/// unconnected `TcpStream` is undefined behavior.
121+
/// unconnected `TcpStream` is unspecified behavior.
122122
pub fn nodelay(&self) -> io::Result<bool> {
123123
self.inner.nodelay()
124124
}
@@ -132,7 +132,7 @@ impl TcpStream {
132132
///
133133
/// On Windows make sure the stream is connected before calling this method,
134134
/// by receiving an (writable) event. Trying to set `ttl` on an
135-
/// unconnected `TcpStream` is undefined behavior.
135+
/// unconnected `TcpStream` is unspecified behavior.
136136
pub fn set_ttl(&self, ttl: u32) -> io::Result<()> {
137137
self.inner.set_ttl(ttl)
138138
}
@@ -145,7 +145,7 @@ impl TcpStream {
145145
///
146146
/// On Windows make sure the stream is connected before calling this method,
147147
/// by receiving an (writable) event. Trying to get `ttl` on an
148-
/// unconnected `TcpStream` is undefined behavior.
148+
/// unconnected `TcpStream` is unspecified behavior.
149149
///
150150
/// [link]: #method.set_ttl
151151
pub fn ttl(&self) -> io::Result<u32> {

src/poll.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl Registry {
409409
/// Callers must ensure that if a source being registered with a `Poll`
410410
/// instance was previously registered with that `Poll` instance, then a
411411
/// call to [`deregister`] has already occurred. Consecutive calls to
412-
/// `register` is undefined behavior.
412+
/// `register` is unspecified behavior.
413413
///
414414
/// Unless otherwise specified, the caller should assume that once an event
415415
/// source is registered with a `Poll` instance, it is bound to that `Poll`
@@ -495,7 +495,7 @@ impl Registry {
495495
/// requested for the handle.
496496
///
497497
/// The event source must have previously been registered with this instance
498-
/// of `Poll`, otherwise the behavior is undefined.
498+
/// of `Poll`, otherwise the behavior is unspecified.
499499
///
500500
/// See the [`register`] documentation for details about the function
501501
/// arguments and see the [`struct`] docs for a high level overview of
@@ -562,11 +562,11 @@ impl Registry {
562562
/// the poll.
563563
///
564564
/// The event source must have previously been registered with this instance
565-
/// of `Poll`, otherwise the behavior is undefined.
565+
/// of `Poll`, otherwise the behavior is unspecified.
566566
///
567567
/// A handle can be passed back to `register` after it has been
568568
/// deregistered; however, it must be passed back to the **same** `Poll`
569-
/// instance, otherwise the behavior is undefined.
569+
/// instance, otherwise the behavior is unspecified.
570570
///
571571
/// # Examples
572572
///

src/waker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::io;
1919
/// Only a single `Waker` can be active per [`Poll`], if multiple threads need
2020
/// access to the `Waker` it can be shared via for example an `Arc`. What
2121
/// happens if multiple `Waker`s are registered with the same `Poll` is
22-
/// undefined.
22+
/// unspecified.
2323
///
2424
/// # Implementation notes
2525
///

tests/poll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ fn reregister_interest_token_usage() {
393393

394394
// This test checks the following register constraint:
395395
// The event source must **not** have been previously registered with this
396-
// instance of `Poll`, otherwise the behavior is undefined.
396+
// instance of `Poll`, otherwise the behavior is unspecified.
397397
//
398398
// This test is done on Windows and epoll platforms where registering a
399399
// source twice is defined behavior that fail with an error code.
@@ -484,7 +484,7 @@ fn poll_ok_after_cancelling_pending_ops() {
484484

485485
// This test checks the following reregister constraint:
486486
// The event source must have previously been registered with this instance
487-
// of `Poll`, otherwise the behavior is undefined.
487+
// of `Poll`, otherwise the behavior is unspecified.
488488
//
489489
// This test is done on Windows and epoll platforms where reregistering a
490490
// source without a previous register is defined behavior that fail with an
@@ -508,7 +508,7 @@ fn reregister_without_register() {
508508

509509
// This test checks the following register/deregister constraint:
510510
// The event source must have previously been registered with this instance
511-
// of `Poll`, otherwise the behavior is undefined.
511+
// of `Poll`, otherwise the behavior is unspecified.
512512
//
513513
// This test is done on Windows and epoll platforms where deregistering a
514514
// source without a previous register is defined behavior that fail with an

tests/tcp_stream.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn set_get_ttl() {
146146
let mut stream = TcpStream::connect(address).unwrap();
147147

148148
// on Windows: the stream must be connected before setting the ttl, otherwise
149-
// it is undefined behavior, register and expect a WRITABLE here to make sure
149+
// it is unspecified behavior, register and expect a WRITABLE here to make sure
150150
// the stream is connected
151151
poll.registry()
152152
.register(&mut stream, ID1, Interest::WRITABLE)
@@ -178,7 +178,7 @@ fn get_ttl_without_previous_set() {
178178
let mut stream = TcpStream::connect(address).unwrap();
179179

180180
// on Windows: the stream must be connected before getting the ttl, otherwise
181-
// it is undefined behavior, register and expect a WRITABLE here to make sure
181+
// it is unspecified behavior, register and expect a WRITABLE here to make sure
182182
// the stream is connected
183183
poll.registry()
184184
.register(&mut stream, ID1, Interest::WRITABLE)
@@ -208,7 +208,7 @@ fn set_get_nodelay() {
208208
let mut stream = TcpStream::connect(address).unwrap();
209209

210210
// on Windows: the stream must be connected before setting the nodelay, otherwise
211-
// it is undefined behavior, register and expect a WRITABLE here to make sure
211+
// it is unspecified behavior, register and expect a WRITABLE here to make sure
212212
// the stream is connected
213213
poll.registry()
214214
.register(&mut stream, ID1, Interest::WRITABLE)
@@ -240,7 +240,7 @@ fn get_nodelay_without_previous_set() {
240240
let mut stream = TcpStream::connect(address).unwrap();
241241

242242
// on Windows: the stream must be connected before setting the nodelay, otherwise
243-
// it is undefined behavior, register and expect a WRITABLE here to make sure
243+
// it is unspecified behavior, register and expect a WRITABLE here to make sure
244244
// the stream is connected
245245
poll.registry()
246246
.register(&mut stream, ID1, Interest::WRITABLE)

0 commit comments

Comments
 (0)