diff --git a/README.md b/README.md index cd92230..409e8bc 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,14 @@ cargo install czv use czv::{RowCount, Result}; fn main() -> Result<()> { - let data = "\ + let data: &str = "\ fruits,price apple,2.50 banana,3.00 strawberry,1.50 "; - let output = RowCount::new() - .file_data(data) - .include_header_row(true) - .execute()?; - println!("{output}"); // 4 + let output: usize = RowCount::new().file_data(data).execute()?; + println!("{output}"); // 3 Ok(()) } ``` diff --git a/czv/examples/simple_row_count.rs b/czv/examples/simple_row_count.rs index b002dab..88ea23c 100644 --- a/czv/examples/simple_row_count.rs +++ b/czv/examples/simple_row_count.rs @@ -1,13 +1,13 @@ -use czv::{count::RowCount, Result}; +use czv::{Result, RowCount}; fn main() -> Result<()> { - let data = "\ + let data: &str = "\ fruits,price apple,2.50 banana,3.00 strawberry,1.50 "; - let output = RowCount::new().file_data(data).execute()?; + let output: usize = RowCount::new().file_data(data).execute()?; println!("{output}"); // 3 Ok(()) }