File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
gix-config/src/file/access Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -272,17 +272,13 @@ impl<'event> File<'event> {
272
272
self . sections . remove ( & id)
273
273
}
274
274
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.
277
276
/// 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 > {
282
278
let id = self . push_section_internal ( section) ;
283
279
let nl = self . detect_newline_style_smallvec ( ) ;
284
280
let section = self . sections . get_mut ( & id) . expect ( "each id yields a section" ) . to_mut ( nl) ;
285
- Ok ( section)
281
+ section
286
282
}
287
283
288
284
/// 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