| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A continuation of #89718.
|
|
|
|
----------
Fix spacing for links inside code blocks, and improve link tooltips in alloc::fmt
----------
Fix spacing for links inside code blocks, and improve link tooltips in alloc::{rc, sync}
----------
Fix spacing for links inside code blocks, and improve link tooltips in alloc::string
----------
Fix spacing for links inside code blocks in alloc::vec
----------
Fix spacing for links inside code blocks in core::option
----------
Fix spacing for links inside code blocks, and improve a few link tooltips in core::result
----------
Fix spacing for links inside code blocks in core::{iter::{self, iterator}, stream::stream, poll}
----------
Fix spacing for links inside code blocks, and improve a few link tooltips in std::{fs, path}
----------
Fix spacing for links inside code blocks in std::{collections, time}
----------
Fix spacing for links inside code blocks in and make formatting of `&str`-like types consistent in std::ffi::{c_str, os_str}
----------
Fix spacing for links inside code blocks, and improve link tooltips in std::ffi
----------
Fix spacing for links inside code blocks, and improve a few link tooltips
in std::{io::{self, buffered::{bufreader, bufwriter}, cursor, util}, net::{self, addr}}
----------
Fix typo in link to `into` for `OsString` docs
----------
Remove tooltips that will probably become redundant in the future
----------
Apply suggestions from code review
Replacing `…std/primitive.reference.html` paths with just `reference`
Co-authored-by: Joshua Nelson <github@jyn.dev>
----------
Also replace `…std/primitive.reference.html` paths with just `reference` in `core::pin`
|
|
|
|
|
|
Constify methods of `std::net::SocketAddr`, `SocketAddrV4` and `SocketAddrV6`
The following methods are made unstable const under the `const_socketaddr` feature (https://github.com/rust-lang/rust/issues/82485):
```rust
// std::net
impl SocketAddr {
pub const fn ip(&self) -> IpAddr;
pub const fn port(&self) -> u16;
pub const fn is_ipv4(&self) -> bool;
pub const fn is_ipv6(&self) -> bool;
}
impl SocketAddrV4 {
pub const fn ip(&self) -> IpAddr;
pub const fn port(&self) -> u16;
}
impl SocketAddrV6 {
pub const fn ip(&self) -> IpAddr;
pub const fn port(&self) -> u16;
pub const fn flowinfo(&self) -> u32;
pub const fn scope_id(&self) -> u32;
}
```
Note: `SocketAddrV4::ip` and `SocketAddrV6::ip` use pointer casting and depend on the unstable feature `const_raw_ptr_deref`
|
|
|
|
The following methods are made unstable const under the `const_socketaddr` feature:
`SocketAddr`
- `ip`
- `port`
- `is_ipv4`
- `is_ipv6`
`SocketAddrV4`
- `ip`
- `port`
`SocketAddrV6`
- `ip`
- `port`
- `flowinfo`
- `scope_id`
|
|
|
|
Co-authored-by: Ivan Tham <pickfire@riseup.net>
|
|
Co-authored-by: Ivan Tham <pickfire@riseup.net>
|
|
I little clarification
|
|
- Use intra-doc links for `std::io` in `std::fs`
- Use intra-doc links for File::read in unix/ext/fs.rs
- Remove explicit intra-doc links for `true` in `net/addr.rs`
- Use intra-doc links in alloc/src/sync.rs
- Use intra-doc links in src/ascii.rs
- Switch to intra-doc links in alloc/rc.rs
- Use intra-doc links in core/pin.rs
- Use intra-doc links in std/prelude
- Use shorter links in `std/fs.rs`
`io` is already in scope.
|
|
Also doing fmt inplace as requested.
|
|
* Impl IntoInner rather than AsInner for Ipv4Addr
* Add some comments
* Add test to show endiannes of Ipv4Addr display
|
|
|
|
|
|
This has already been done for `SocketAddrV4`, `SocketAddrV6`,
`IpAddrV4` and `IpAddrV6`. I don't see a point to keep the rather bad
to read derived impl, especially when pretty printing:
V4(
127.0.0.1
)
From the `Display`, one can easily and unambiguously see if it's V4 or
V6. Using `Display` as `Debug` is very convenient for configuration
structs (e.g. for webservers) that often just have a `derive(Debug)`
and are printed that way to the user.
|
|
|