From 8f76d6f74ed67b839bb7a7f7358b6f591f63c516 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sun, 31 Jan 2016 10:19:58 +0100 Subject: [PATCH] Remove debugging println in tests --- shader-parser/src/parse.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shader-parser/src/parse.rs b/shader-parser/src/parse.rs index dcfc12db..4bfccd0e 100644 --- a/shader-parser/src/parse.rs +++ b/shader-parser/src/parse.rs @@ -1,4 +1,5 @@ +/// Parses a SPIR-V document. pub fn parse_spirv(data: &[u8]) -> Result { if data.len() < 20 { return Err(ParseError::MissingHeader); @@ -25,6 +26,9 @@ pub fn parse_spirv(data: &[u8]) -> Result { parse_u32s(&data) } +/// Parses a SPIR-V document from a list of u32s. +/// +/// Endianess has already been handled. fn parse_u32s(i: &[u32]) -> Result { if i.len() < 5 { return Err(ParseError::MissingHeader); @@ -54,6 +58,7 @@ fn parse_u32s(i: &[u32]) -> Result { }) } +/// Error that can happen when parsing. #[derive(Debug, Clone)] pub enum ParseError { MissingHeader, @@ -291,8 +296,6 @@ mod test { #[test] fn test() { let data = include_bytes!("../tests/frag.spv"); - let doc = parse::parse_spirv(data).unwrap(); - - println!("{:?}", doc); + parse::parse_spirv(data).unwrap(); } }