Skip to content

Commit

Permalink
Rename write -> write_out
Browse files Browse the repository at this point in the history
  • Loading branch information
eikek committed Jul 18, 2024
1 parent 66f6a2e commit 7217f82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cli/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ impl Context {
self.client.base_url()
}

/// A short hand for `Sink::write(self.format(), value)`
/// A short hand for `Sink::write_out(self.format(), value)`
async fn write_result<A: Sink + Serialize>(&self, value: &A) -> Result<(), SinkError> {
let fmt = self.opts.format;
Sink::write(&fmt, value)
Sink::write_out(&fmt, value)
}

/// A short hand for `Sink::write_err(self.format(), value)`
Expand Down
2 changes: 1 addition & 1 deletion src/cli/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub trait Sink
where
Self: Serialize + Display,
{
fn write(format: &Format, value: &Self) -> Result<(), Error> {
fn write_out(format: &Format, value: &Self) -> Result<(), Error> {
match format {
Format::Json => {
serde_json::to_writer(std::io::stdout(), value)?;
Expand Down

0 comments on commit 7217f82

Please sign in to comment.