File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
sources/api/apiserver/src/server Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ where
136
136
let os = BottlerocketRelease :: new ( ) . context ( error:: ReleaseDataSnafu ) ?;
137
137
138
138
// Turn into a serde Value we can manipulate.
139
- let val = serde_json:: to_value ( os) . context ( error :: SettingsToJsonSnafu ) ? ;
139
+ let val = serde_json:: to_value ( os) . expect ( "struct to value can't fail" ) ;
140
140
141
141
// Structs are Objects in serde_json, which have a map of field -> value inside. We
142
142
// destructure to get it by value, instead of as_object() which gives references.
@@ -366,7 +366,7 @@ pub(crate) fn set_settings<D: DataStore>(
366
366
transaction : & str ,
367
367
) -> Result < ( ) > {
368
368
trace ! ( "Serializing Settings to write to data store" ) ;
369
- let settings_json = serde_json:: to_value ( settings) . expect ( "struct to value can't fail" ) ;
369
+ let settings_json = serde_json:: to_value ( settings) . context ( error :: SettingsToJsonSnafu ) ? ;
370
370
let pairs = to_pairs_with_prefix ( "settings" , & settings_json)
371
371
. context ( error:: DataStoreSerializationSnafu { given : "Settings" } ) ?;
372
372
let pending = Committed :: Pending {
You can’t perform that action at this time.
0 commit comments