Skip to content

Commit dbf6df2

Browse files
committed
Hint that the user might still want to append in a single write.
1 parent d517b47 commit dbf6df2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: library/std/src/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,10 @@ impl OpenOptions {
991991
/// single `write()` call depends on the operating system and file system. A
992992
/// successful `write()` is allowed to write only part of the given data, so even if
993993
/// you're careful to provide the whole message in a single call to `write()`, there
994-
/// is no guarantee that it will written out in full.
994+
/// is no guarantee that it will written out in full. If you rely on the filesystem
995+
/// accepting the message in a single write, make sure that all data that belongs
996+
/// together is written in one operation. This can be done by concatenating strings
997+
/// before passing them to [`write()`].
995998
///
996999
/// If a file is opened with both read and append access, beware that after
9971000
/// opening, and after every write, the position for reading may be set at the

0 commit comments

Comments
 (0)