From ba9c8568d3c6611496e6726a9c5d7d587d38732a Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Tue, 5 Jul 2022 01:44:16 +0530 Subject: [PATCH] Read dbinfo and output table count --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6c3a91f..f2feafd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,8 +31,7 @@ fn main() -> Result<()> { let cell_pointers = database[108..] .chunks_exact(2) .take(page_header.number_of_cells.into()) - .map(|bytes| u16::from_be_bytes(bytes.try_into().unwrap())) - .collect::>(); + .map(|bytes| u16::from_be_bytes(bytes.try_into().unwrap())); // Obtain all records from column 5 #[allow(unused_variables)] @@ -48,7 +47,8 @@ fn main() -> Result<()> { .collect::>>()?; // You can use print statements as follows for debugging, they'll be visible when running tests. - println!("Logs from your program will appear here!"); + + print!("number of tables: {}", schemas.len()); // Uncomment this block to pass the first stage // println!("number of tables: {}", schemas.len());