Skip to content

Commit 321b680

Browse files
author
Federico Ponzi
committed
Update docs of OpenOptions::as_flags
1 parent 7c1e5c1 commit 321b680

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/std/src/sys/unix/ext/fs.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,9 @@ pub trait OpenOptionsExt {
346346
#[stable(feature = "open_options_ext", since = "1.10.0")]
347347
fn custom_flags(&mut self, flags: i32) -> &mut Self;
348348

349-
/// Get the flags of this OpenOptions as [`libc::c_int`].
350-
/// With: [`libc::open`]
349+
/// Get the flags as [`libc::c_int`].
351350
///
352-
/// This method allows the reuse of the OpenOptions as flags argument for [`fs::OpenOptions`].
351+
/// This method allows the reuse of the OpenOptions as flags argument for [`libc::open`].
353352
///
354353
/// [`libc::c_int`]: https://docs.rs/libc/*/libc/type.c_int.html
355354
/// [`libc::open`]: https://docs.rs/libc/*/libc/fn.open.html

library/std/src/sys/unix/fs.rs

+1
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ impl OpenOptions {
655655
pub fn mode(&mut self, mode: u32) {
656656
self.mode = mode as mode_t;
657657
}
658+
658659
pub fn as_flags(&self) -> io::Result<c_int> {
659660
let access_mode = self.get_access_mode()?;
660661
let creation_mode = self.get_creation_mode()?;

0 commit comments

Comments
 (0)