File tree Expand file tree Collapse file tree
gix-config/src/file/access Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,17 +272,13 @@ impl<'event> File<'event> {
272272 self . sections . remove ( & id)
273273 }
274274
275- /// Adds the provided section to the config, returning a mutable reference
276- /// to it for immediate editing.
275+ /// Adds the provided `section` to the config, returning a mutable reference to it for immediate editing.
277276 /// Note that its meta-data will remain as is.
278- pub fn push_section (
279- & mut self ,
280- section : file:: Section < ' event > ,
281- ) -> Result < SectionMut < ' _ , ' event > , section:: header:: Error > {
277+ pub fn push_section ( & mut self , section : file:: Section < ' event > ) -> SectionMut < ' _ , ' event > {
282278 let id = self . push_section_internal ( section) ;
283279 let nl = self . detect_newline_style_smallvec ( ) ;
284280 let section = self . sections . get_mut ( & id) . expect ( "each id yields a section" ) . to_mut ( nl) ;
285- Ok ( section)
281+ section
286282 }
287283
288284 /// Renames the section with `name` and `subsection_name`, modifying the last matching section
You can’t perform that action at this time.
0 commit comments