File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,8 @@ pub mod geoparquet {
210210 /// Adds a collection to this writer's metadata.
211211 ///
212212 /// Warns and overwrites if there's already a collection with the same id.
213- pub fn add_collection ( mut self , collection : Collection ) -> StacGeoparquetObjectWriter {
213+ pub fn add_collection ( & mut self , collection : Collection ) {
214214 self . state . add_collection ( collection) ;
215- self
216215 }
217216
218217 pub async fn close ( mut self ) -> Result < ( ) > {
@@ -293,16 +292,16 @@ mod tests {
293292 let item: Item = stac:: read ( "examples/simple-item.json" ) . unwrap ( ) ;
294293 let collection = stac:: Collection :: new ( "test-collection" , "Test description" ) ;
295294
296- let writer = StacGeoparquetObjectWriter :: new (
295+ let mut writer = StacGeoparquetObjectWriter :: new (
297296 store. clone ( ) ,
298297 Path :: from ( "test-with-collection" ) ,
299298 vec ! [ item. clone( ) ] ,
300299 Default :: default ( ) ,
301300 Default :: default ( ) ,
302301 )
303302 . await
304- . unwrap ( )
305- . add_collection ( collection) ;
303+ . unwrap ( ) ;
304+ writer . add_collection ( collection) ;
306305
307306 writer. close ( ) . await . unwrap ( ) ;
308307
You can’t perform that action at this time.
0 commit comments