File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub fn handle_add(doc: &mut DocumentMut, op: AddOp) -> Result<()> {
4545 }
4646 None => {
4747 let mut path_split = path
48- . expect ( "Missing 'path' value" )
48+ . context ( "Missing 'path' value" ) ?
4949 . split ( '/' )
5050 . map ( |s| s. to_string ( ) )
5151 . collect :: < Vec < String > > ( ) ;
Original file line number Diff line number Diff line change 1- use anyhow:: { bail, Result } ;
1+ use anyhow:: { bail, Context , Result } ;
22use toml_edit:: { array, Item , Table , Value } ;
33
44/*
@@ -24,7 +24,7 @@ pub fn add_value_with_table_header_and_dotted_path(
2424 None => {
2525 add_value_with_dotted_path (
2626 table,
27- dotted_path. expect ( "Missing 'path' value" ) . as_slice ( ) ,
27+ dotted_path. context ( "Missing 'path' value" ) ? . as_slice ( ) ,
2828 value,
2929 ) ?;
3030 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments