Make stream.append call sites consistent

Maybe the wrong direction.. but this seems to be the majority.
This commit is contained in:
Johannes Altmanninger 2023-10-03 20:48:47 -05:00
parent 2fb352a9e4
commit 1bfdc33f76
3 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ pub fn emit(
let Some(event_name) = argv.get(opts.optind) else {
streams
.err
.append(&sprintf!("%ls: expected event name\n"L, cmd));
.append(sprintf!("%ls: expected event name\n"L, cmd));
return STATUS_INVALID_ARGS;
};

View File

@ -31,7 +31,7 @@ impl StringSubCommand<'_> for Transform {
n_transformed += 1;
}
if !self.quiet {
streams.out.append(&transformed);
streams.out.append(transformed);
if want_newline {
streams.out.append1('\n');
}

View File

@ -866,7 +866,7 @@ pub fn print(streams: &mut io_streams_t, type_filter: &wstr) {
last_type = std::mem::discriminant(&evt.desc);
streams
.out
.append(&sprintf!(L!("Event %ls\n"), evt.desc.name()));
.append(sprintf!(L!("Event %ls\n"), evt.desc.name()));
}
match &evt.desc {
@ -874,18 +874,18 @@ pub fn print(streams: &mut io_streams_t, type_filter: &wstr) {
let name: WString = signal.name().into();
streams
.out
.append(&sprintf!(L!("%ls %ls\n"), name, evt.function_name));
.append(sprintf!(L!("%ls %ls\n"), name, evt.function_name));
}
EventDescription::ProcessExit { .. } | EventDescription::JobExit { .. } => {}
EventDescription::CallerExit { .. } => {
streams
.out
.append(&sprintf!(L!("caller-exit %ls\n"), evt.function_name));
.append(sprintf!(L!("caller-exit %ls\n"), evt.function_name));
}
EventDescription::Variable { name: param } | EventDescription::Generic { param } => {
streams
.out
.append(&sprintf!(L!("%ls %ls\n"), param, evt.function_name));
.append(sprintf!(L!("%ls %ls\n"), param, evt.function_name));
}
EventDescription::Any => unreachable!(),
}