From 7217f8234c2a93cd7dcbb8f060e74fc4f0b630e7 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Thu, 18 Jul 2024 11:58:42 +0200 Subject: [PATCH] Rename write -> write_out --- src/cli/cmd.rs | 4 ++-- src/cli/sink.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/cmd.rs b/src/cli/cmd.rs index 8d58c74..6dccf51 100644 --- a/src/cli/cmd.rs +++ b/src/cli/cmd.rs @@ -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(&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)` diff --git a/src/cli/sink.rs b/src/cli/sink.rs index 0c4faaa..16cdb78 100644 --- a/src/cli/sink.rs +++ b/src/cli/sink.rs @@ -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)?;