fish-shell/src
Mahmoud Al-Qudsi decf99f71b
Use File instead of OwnedFd in a few places (#10355)
This is a step towards converting `wopen_cloexec()` to return `File` instead of
`OwnedFd`/`AutocloseFd`.¹

In addition to letting us use native standard library functions instead of
unsafe libc calls, we gain additional semantic safety because `File` operations
that manipulate the state of the fd (e.g. `File::seek()`) require a `&mut`
reference to the `File`, whereas using `RawFd` or `OwnedFd` everywhere leaves us
in a position where it's not clear whether or not other references to the same
fd will manipulate its underlying state.

¹ We actually wouldn't even need `wopen_cloexec()` at all (just a widechar
wrapper) as Rust's native `File::open()`/`File::create()` functionality uses
`FD_CLOEXEC` internally.
2024-03-17 11:20:44 -05:00
..
bin Suppress unknown_lints lint 2024-03-09 13:49:25 +01:00
builtins builtin read: minor code cleanup 2024-03-16 10:31:01 +01:00
env Address clippy lints 2024-03-09 13:49:25 +01:00
fork_exec Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
history Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
tests Fix formatting of new test 2024-03-09 22:06:33 -06:00
universal_notifier Move from libc read/write to nix read/write 2024-01-21 11:49:40 -08:00
widecharwidth Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wutil Convert fish_mkstemp_cloexec() to return an OwnedFd 2024-03-09 15:21:47 -06:00
abbrs.rs abbr: Box the regex 2024-02-28 18:48:24 +01:00
ast.rs ast: Replace can_parse with static dispatch 2024-03-16 08:39:27 +01:00
autoload.rs Address clippy lints 2024-03-09 13:49:25 +01:00
color.rs Fix some clippy warnings 2024-01-21 19:12:33 -08:00
common.rs Simplify control flow in env_universal_common::save() 2024-03-09 15:21:47 -06:00
complete.rs Only use fuzzy option completion if there is a leading - 2024-01-30 09:09:45 +01:00
curses.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00
editable_line.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
env_dispatch.rs Remove unnecessary scoped #[allow] attributes 2024-03-09 13:49:25 +01:00
env_universal_common.rs Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
event.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
exec.rs Remove unnecessary formatting 2024-03-09 12:06:24 +01:00
expand.rs Add feature flag to turn off %self (#10262) 2024-02-06 22:13:16 +01:00
fallback.rs Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
fd_monitor.rs Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
fd_readable_set.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
fds.rs Correct some comments and duplicative error messages 2024-02-11 12:16:58 -08:00
fish_test_helper.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
flog.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
function.rs Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
future_feature_flags.rs Address clippy lints 2024-03-09 13:49:25 +01:00
future.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
global_safety.rs Simplify shared-from-this pattern 2024-03-09 10:09:03 +01:00
highlight.rs Address clippy lints 2024-03-09 13:49:25 +01:00
history.rs Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
input_common.rs Stop crashing on invalid Unicode input 2024-02-27 22:59:49 +01:00
input.rs input: Resolve a TODO 2024-02-16 19:40:39 +01:00
io.rs Correct some comments and duplicative error messages 2024-02-11 12:16:58 -08:00
job_group.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
kill.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
lib.rs Suppress unknown_lints lint 2024-03-09 13:49:25 +01:00
libc.c Switch to the terminfo crate 2024-02-22 20:10:16 +01:00
libc.rs Remove uses of LC_GLOBAL_LOCALE 2024-02-01 22:15:24 +01:00
locale.rs Remove uses of LC_GLOBAL_LOCALE 2024-02-01 22:15:24 +01:00
nix.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
null_terminated_array.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
operation_context.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
output.rs Change MainThread<T> abstraction 2024-03-01 19:42:43 -06:00
pager.rs pager: Make search text translatable 2024-03-10 16:38:05 +01:00
parse_constants.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
parse_execution.rs Forbid subcommand keywords in variables-as-commands (#10249) 2024-02-06 22:12:55 +01:00
parse_tree.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
parse_util.rs Disallow background operator before && or || 2024-01-20 11:32:44 +01:00
parser_keywords.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
parser.rs Fix some translated strings 2024-03-10 16:15:15 +01:00
path.rs Fix build on NetBSD (#10270) 2024-01-28 21:45:14 +01:00
pointer.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
print_help.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
proc.rs clippy 2024-01-13 08:52:54 +01:00
re.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
reader_history_search.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
reader.rs reader: Use our isatty overload 2024-03-10 20:47:26 +01:00
redirection.rs Use nix OFlag for open_cloexec 2024-01-27 20:42:13 +01:00
screen.rs Change MainThread<T> abstraction 2024-03-01 19:42:43 -06:00
signal.rs Use cfg directly instead of going through features 2024-01-13 15:16:47 -06:00
termsize.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
threads.rs Address clippy lints 2024-03-09 13:49:25 +01:00
timer.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
tinyexpr.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
tokenizer.rs Add # as a path component char 2024-01-28 10:41:15 +01:00
topic_monitor.rs Use OwnedFd in AutoClosePipes 2024-02-11 11:40:27 -08:00
trace.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
util.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wait_handle.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wchar_ext.rs Disallow background operator before && or || 2024-01-20 11:32:44 +01:00
wchar.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
wcstringutil.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00
wgetopt.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wildcard.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00