File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ impl<'py> FromPyObject<'_, 'py> for PyGetOptions {
3737 type Error = PyErr ;
3838
3939 fn extract ( obj : Borrowed < ' _ , ' py , PyAny > ) -> Result < Self , Self :: Error > {
40- // Update to use derive(FromPyObject) when default is implemented:
41- // https://github.com/PyO3/pyo3/issues/4643
40+ // Can't use derive(FromPyObject) when all fields have default values
4241 let dict = obj. extract :: < HashMap < String , Bound < PyAny > > > ( ) ?;
4342 Ok ( Self {
4443 if_match : dict. get ( "if_match" ) . map ( |x| x. extract ( ) ) . transpose ( ) ?,
Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ impl<'py> FromPyObject<'_, 'py> for PyUpdateVersion {
5252 type Error = PyErr ;
5353
5454 fn extract ( obj : Borrowed < ' _ , ' py , PyAny > ) -> Result < Self , Self :: Error > {
55- // Update to use derive(FromPyObject) when default is implemented:
56- // https://github.com/PyO3/pyo3/issues/4643
55+ // Can't use derive(FromPyObject) when all fields have default values
5756 let dict = obj. extract :: < HashMap < String , Bound < PyAny > > > ( ) ?;
5857 Ok ( Self ( UpdateVersion {
5958 e_tag : dict. get ( "e_tag" ) . map ( |x| x. extract ( ) ) . transpose ( ) ?,
You can’t perform that action at this time.
0 commit comments