Skip to content

Commit 1b1c6df

Browse files
committed
misc cleanup
1 parent 2952ed1 commit 1b1c6df

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

launchk/src/tui/omnibox/command.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,41 +40,41 @@ pub static OMNIBOX_COMMANDS: [(&str, &str, OmniboxCommand); 12] = [
4040
),
4141
(
4242
"bootstrap",
43-
"▶️ Bootstrap highlighted service",
43+
"Bootstrap highlighted service",
4444
OmniboxCommand::BootstrapRequest,
4545
),
4646
(
4747
"bootout",
48-
"⏏️ Stop highlighted service",
48+
"Stop highlighted service",
4949
OmniboxCommand::BootoutRequest,
5050
),
5151
(
5252
"enable",
53-
"▶️ Enable highlighted job (enables load)",
53+
"Enable highlighted job (enables load)",
5454
OmniboxCommand::EnableRequest,
5555
),
5656
(
5757
"disable",
58-
"⏏️ Disable highlighted job (prevents load)",
58+
"Disable highlighted job (prevents load)",
5959
OmniboxCommand::DisableRequest,
6060
),
61-
("edit", "✍️ Edit plist with $EDITOR", OmniboxCommand::Edit),
62-
("csrinfo", "ℹ️ See all CSR flags", OmniboxCommand::CSRInfo),
61+
("edit", "Edit plist with $EDITOR", OmniboxCommand::Edit),
62+
("csrinfo", "See all CSR flags", OmniboxCommand::CSRInfo),
6363
(
6464
"dumpstate",
65-
"ℹ️ launchctl dumpstate",
65+
"launchctl dumpstate",
6666
OmniboxCommand::DumpState,
6767
),
6868
(
6969
"dumpjpcategory",
70-
"ℹ️ launchctl dumpjpcategory",
70+
"launchctl dumpjpcategory",
7171
OmniboxCommand::DumpJetsamPropertiesCategory,
7272
),
7373
(
7474
"procinfo",
75-
"ℹ️ launchctl procinfo for highlighted process",
75+
"launchctl procinfo for highlighted process",
7676
OmniboxCommand::ProcInfo,
7777
),
78-
("help", "🤔 Show all commands", OmniboxCommand::Help),
79-
("exit", "🚪 see ya!", OmniboxCommand::Quit),
78+
("help", "Show all commands", OmniboxCommand::Help),
79+
("exit", "Exit", OmniboxCommand::Quit),
8080
];

launchk/src/tui/omnibox/view.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl OmniboxView {
143143
};
144144

145145
match (event, mode) {
146-
(ev, OmniboxMode::JobTypeFilter) => Self::handle_job_type_filter(ev, state),
147146
// User -> string filters
148147
(Event::Char(_), OmniboxMode::LabelFilter)
149148
| (Event::Char(_), OmniboxMode::CommandFilter) => {
@@ -394,9 +393,8 @@ impl View for OmniboxView {
394393
Some("".to_string()),
395394
None,
396395
)),
397-
(e, OmniboxMode::Idle) => Self::handle_job_type_filter(&e, &state),
398-
(e, OmniboxMode::JobTypeFilter) => {
399-
let s = Self::handle_active(&e, &state);
396+
(e, OmniboxMode::JobTypeFilter | OmniboxMode::Idle) => {
397+
let s = Self::handle_job_type_filter(&e, &state);
400398
self.tx.send(OmniboxEvent::Command(OmniboxCommand::FocusServiceList)).expect("Must focus");
401399
s
402400
},

xpc-sys/src/api/pipe_routine.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ pub fn pipe_interface_routine<S: Into<XPCObject>>(
8484
pub fn handle_reply_dict_errors(reply: XPCObject) -> Result<XPCObject, XPCError> {
8585
let dict: XPCHashMap = reply.clone().to_rust()?;
8686

87-
log::debug!("XPC dictionary reply {:?}", dict);
88-
8987
if dict.contains_key("error") {
9088
let errcode: i64 = dict.get("error").unwrap().to_rust()?;
9189

xpc-sys/src/object/unix_fifo.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub struct UnixFifo(pub CString);
1515

1616
impl UnixFifo {
1717
/// Create a new FIFO, make sure mode_t is 0oXXX!
18-
#[must_use]
1918
pub fn new(mode: mode_t) -> Result<Self, String> {
2019
let fifo_name = unsafe { CStr::from_ptr(tmpnam(null_mut())) };
2120
let err = unsafe { mkfifo(fifo_name.as_ptr(), mode) };
@@ -28,7 +27,6 @@ impl UnixFifo {
2827
}
2928

3029
/// Open O_RDONLY, read until EOF, close fd, return buffer.
31-
#[must_use]
3230
pub fn block_and_read_bytes(&self) -> Result<Vec<u8>, String> {
3331
let Self(fifo_name) = self;
3432

@@ -44,7 +42,6 @@ impl UnixFifo {
4442
}
4543

4644
/// Open O_WRONLY, call fn, close fd, yield result
47-
#[must_use]
4845
pub fn with_writer<T>(&self, f: impl Fn(RawFd) -> T) -> Result<T, String> {
4946
let Self(fifo_name) = self;
5047
let fifo_fd_write = unsafe { open(fifo_name.as_ptr(), O_WRONLY) };
@@ -55,7 +52,6 @@ impl UnixFifo {
5552
}
5653

5754
/// Wrap libc close()
58-
#[must_use]
5955
pub fn close(fd: RawFd) -> Result<(), String> {
6056
let err = unsafe { libc::close(fd) };
6157

0 commit comments

Comments
 (0)