File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 94
94
# no memory and leak sanitizer support yet
95
95
SANITIZERS="address thread"
96
96
fi
97
-
98
97
for sanitizer in $SANITIZERS; do
99
98
echo "Running tests with $sanitizer sanitizer..."
100
- RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly test -Z build-std --target "$TARGET"
99
+ RUSTFLAGS="-Z sanitizer=$sanitizer" RUSTDOCFLAGS="-Z sanitizer=$sanitizer" cargo +nightly test -Z build-std --target "$TARGET"
101
100
done
102
101
103
102
- name : Check formatting
Original file line number Diff line number Diff line change
1
+ # Keep in sync with `Cargo.toml` `edition`.
2
+ #
3
+ # `rustfmt` envoked not through `cargo fmt` but directly does not pick up Rust
4
+ # edition in `Cargo.toml`. Thus duplicate here.
5
+ edition = " 2021"
6
+
7
+ comment_width =100
8
+ wrap_comments =true
9
+
10
+ imports_granularity =" Crate"
11
+ group_imports =" StdExternalCrate"
12
+
13
+ format_code_in_doc_comments =true
Original file line number Diff line number Diff line change @@ -20,7 +20,20 @@ fn default_result<T>() -> Result<T, Error> {
20
20
) )
21
21
}
22
22
23
- /// Return the MTU of the interface that is used to reach the given remote socket address.
23
+ /// Return the maximum transmission unit (MTU) of the local network interface towards the
24
+ /// destination [`SocketAddr`] given in `remote`.
25
+ ///
26
+ /// The returned MTU may exceed the maximum IP packet size of 65,535 bytes on some
27
+ /// platforms for some remote destinations. (For example, loopback destinations on
28
+ /// Windows.)
29
+ ///
30
+ /// # Examples
31
+ ///
32
+ /// ```
33
+ /// let saddr = "127.0.0.1:443".parse().unwrap();
34
+ /// let mtu = mtu::get_interface_mtu(&saddr).unwrap();
35
+ /// println!("MTU towards {:?} is {}", saddr, mtu);
36
+ /// ```
24
37
///
25
38
/// # Errors
26
39
///
You can’t perform that action at this time.
0 commit comments