mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
Rename Sigchecker to SigChecker to be more idiomatic
Idiomatic rust naming for types is "PascalCase" and this was more "Pascalcase".
This commit is contained in:
parent
55c3df7f41
commit
6a3ece6766
3 changed files with 8 additions and 8 deletions
|
@ -5,7 +5,7 @@ use crate::builtins::shared::{
|
|||
STATUS_CMD_OK, STATUS_INVALID_ARGS,
|
||||
};
|
||||
use crate::ffi::{job_t, parser_t, proc_wait_any, Repin};
|
||||
use crate::signal::Sigchecker;
|
||||
use crate::signal::SigChecker;
|
||||
use crate::wait_handle::{WaitHandleRef, WaitHandleStore};
|
||||
use crate::wchar::{widestrs, wstr};
|
||||
use crate::wgetopt::{wgetopter_t, wopt, woption, woption_argument_t};
|
||||
|
@ -112,7 +112,7 @@ fn wait_for_completion(
|
|||
return Some(0);
|
||||
}
|
||||
|
||||
let mut sigint = Sigchecker::new_sighupint();
|
||||
let mut sigint = SigChecker::new_sighupint();
|
||||
loop {
|
||||
let finished = if any_flag {
|
||||
whs.iter().any(is_completed)
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::global_safety::RelaxedAtomicBool;
|
|||
use crate::job_group::JobGroup;
|
||||
use crate::path::path_apply_working_directory;
|
||||
use crate::redirection::{RedirectionMode, RedirectionSpecList};
|
||||
use crate::signal::Sigchecker;
|
||||
use crate::signal::SigChecker;
|
||||
use crate::topic_monitor::topic_t;
|
||||
use crate::wchar::{wstr, WString, L};
|
||||
use crate::wutil::{perror, wdirname, wstat, wwrite_to_fd};
|
||||
|
@ -789,7 +789,7 @@ pub struct FdOutputStream {
|
|||
fd: RawFd,
|
||||
|
||||
/// Used to check if a SIGINT has been received when EINTR is encountered
|
||||
sigcheck: Sigchecker,
|
||||
sigcheck: SigChecker,
|
||||
|
||||
/// Whether we have received an error.
|
||||
errored: bool,
|
||||
|
@ -800,7 +800,7 @@ impl FdOutputStream {
|
|||
assert!(fd >= 0, "Invalid fd");
|
||||
FdOutputStream {
|
||||
fd,
|
||||
sigcheck: Sigchecker::new(topic_t::sighupint),
|
||||
sigcheck: SigChecker::new(topic_t::sighupint),
|
||||
errored: false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -359,15 +359,15 @@ pub fn signal_unblock_all() {
|
|||
}
|
||||
|
||||
/// A Sigchecker can be used to check if a SIGINT (or SIGHUP) has been delivered.
|
||||
pub struct Sigchecker {
|
||||
pub struct SigChecker {
|
||||
topic: topic_t,
|
||||
gen: generation_t,
|
||||
}
|
||||
|
||||
impl Sigchecker {
|
||||
impl SigChecker {
|
||||
/// Create a new checker for the given topic.
|
||||
pub fn new(topic: topic_t) -> Self {
|
||||
let mut res = Sigchecker { topic, gen: 0 };
|
||||
let mut res = SigChecker { topic, gen: 0 };
|
||||
// Call check() to update our generation.
|
||||
res.check();
|
||||
res
|
||||
|
|
Loading…
Reference in a new issue