From 11a55cb99cb2fee075c5c5114ede3126e3f6d38e Mon Sep 17 00:00:00 2001 From: Piotr Figiela <77412592+Draggu@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:11:51 +0100 Subject: [PATCH] make parse_stream and scarb_command public --- scarb-metadata/src/command/metadata_command.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scarb-metadata/src/command/metadata_command.rs b/scarb-metadata/src/command/metadata_command.rs index 0311597cc..5c11dcf4a 100644 --- a/scarb-metadata/src/command/metadata_command.rs +++ b/scarb-metadata/src/command/metadata_command.rs @@ -126,7 +126,8 @@ impl MetadataCommand { self } - fn scarb_command(&self) -> Command { + /// Creates [`Command`] from this [`MetadataCommand`] + pub fn scarb_command(&self) -> Command { let mut builder = self.inner.clone(); builder.json(); builder.args(["metadata", "--format-version"]); @@ -151,7 +152,8 @@ impl MetadataCommand { } } -fn parse_stream(data: &[u8]) -> Result { +/// Parses [`Metadata`] from raw output +pub fn parse_stream(data: &[u8]) -> Result { let mut err = None; for line in BufRead::split(data, b'\n') { let line = line?;