Skip to content

Commit 755e475

Browse files
committed
Rename FilenameTooLong to FilenameInvalid
1 parent 1115f15 commit 755e475

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library/std/src/io/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ pub enum ErrorKind {
301301
/// The limit might be from the underlying filesystem or API, or an administratively imposed
302302
/// resource limit.
303303
#[unstable(feature = "io_error_more", issue = "86442")]
304-
FilenameTooLong,
304+
FilenameInvalid,
305305
/// Program argument list too long.
306306
///
307307
/// When trying to run an external program, a system or process limit on the size of the
@@ -382,7 +382,7 @@ impl ErrorKind {
382382
DirectoryNotEmpty => "directory not empty",
383383
ExecutableFileBusy => "executable file busy",
384384
FileTooLarge => "file too large",
385-
FilenameTooLong => "filename too long",
385+
FilenameInvalid => "filename too long",
386386
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
387387
FilesystemQuotaExceeded => "filesystem quota exceeded",
388388
HostUnreachable => "host unreachable",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
159159
libc::ENOSPC => StorageFull,
160160
libc::ENOSYS => Unsupported,
161161
libc::EMLINK => TooManyLinks,
162-
libc::ENAMETOOLONG => FilenameTooLong,
162+
libc::ENAMETOOLONG => FilenameInvalid,
163163
libc::ENETDOWN => NetworkDown,
164164
libc::ENETUNREACH => NetworkUnreachable,
165165
libc::ENOTCONN => NotConnected,

library/std/src/sys/windows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
104104
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
105105
c::ERROR_NOT_SAME_DEVICE => return CrossesDevices,
106106
c::ERROR_TOO_MANY_LINKS => return TooManyLinks,
107-
c::ERROR_FILENAME_EXCED_RANGE => return FilenameTooLong,
107+
c::ERROR_FILENAME_EXCED_RANGE => return FilenameInvalid,
108108
_ => {}
109109
}
110110

0 commit comments

Comments
 (0)