[READ-ONLY] Mirror of https://github.com/probablykasper/csv-pipeline.
0

Configure Feed

Select the types of activity you want to include in your feed.

Add assertion in add_col example

Kasper (Jan 11, 2023, 4:42 PM +0100) 5a102fe3 ff016049

+7 -3
+7 -3
src/pipeline.rs
··· 49 49 /// ``` 50 50 /// use csv_pipeline::Pipeline; 51 51 /// 52 - /// Pipeline::from_path("test/AB.csv") 52 + /// let csv = Pipeline::from_path("test/AB.csv") 53 53 /// .unwrap() 54 54 /// .add_col("C", |headers, row| { 55 - /// Ok("1".to_string()) 56 - /// }); 55 + /// Ok("3".to_string()) 56 + /// }) 57 + /// .collect_into_string() 58 + /// .unwrap(); 59 + /// 60 + /// assert_eq!(csv, "A,B,C\n1,2,3\n"); 57 61 /// ``` 58 62 pub fn add_col<F>(mut self, name: &str, get_value: F) -> Self 59 63 where