From 53447d1f4808b048ec131c2ee948969c29dc1b0a Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 3 Jan 2023 15:23:01 +0100 Subject: [PATCH] Fix: Pass arguments in right order Signed-off-by: Matthias Beyer --- src/helpers/json.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/json.rs b/src/helpers/json.rs index 40921ec..cd3ccb2 100644 --- a/src/helpers/json.rs +++ b/src/helpers/json.rs @@ -46,7 +46,7 @@ pub fn to_vec(data: &Data) -> Result> { /// Attempts to serialize a Data struct to something that implements the /// std::io::Write trait pub fn to_writer(data: &Data, writer: W) -> Result<()> { - Ok(serde_json::to_writer(data, writer)?) + Ok(serde_json::to_writer(writer, data)?) } /// Attempts to serialize a Data struct to a file