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