@@ -152,7 +152,7 @@ pub fn run_make_migrations(options: MakeMigrationsOptions) -> anyhow::Result<()>
152152 internal_models
153153 . models
154154 . iter ( )
155- . filter ( |x| old_lookup. get ( x. name . as_str ( ) ) . is_some ( ) )
155+ . filter ( |x| old_lookup. contains_key ( x. name . as_str ( ) ) )
156156 . for_each ( |x| {
157157 // Check if a new field has been added
158158 x. fields . iter ( ) . for_each ( |y| {
@@ -161,7 +161,7 @@ pub fn run_make_migrations(options: MakeMigrationsOptions) -> anyhow::Result<()>
161161 . iter ( )
162162 . any ( |z| z. name == y. name )
163163 {
164- if new_fields. get ( x. name . as_str ( ) ) . is_none ( ) {
164+ if ! new_fields. contains_key ( x. name . as_str ( ) ) {
165165 new_fields. insert ( x. name . clone ( ) , vec ! [ ] ) ;
166166 }
167167 new_fields. get_mut ( x. name . as_str ( ) ) . unwrap ( ) . push ( y) ;
@@ -171,7 +171,7 @@ pub fn run_make_migrations(options: MakeMigrationsOptions) -> anyhow::Result<()>
171171 // Check if a existing field got deleted
172172 old_lookup[ x. name . as_str ( ) ] . fields . iter ( ) . for_each ( |y| {
173173 if !x. fields . iter ( ) . any ( |z| z. name == y. name ) {
174- if deleted_fields. get ( x. name . as_str ( ) ) . is_none ( ) {
174+ if ! deleted_fields. contains_key ( x. name . as_str ( ) ) {
175175 deleted_fields. insert ( x. name . clone ( ) , vec ! [ ] ) ;
176176 }
177177 deleted_fields. get_mut ( x. name . as_str ( ) ) . unwrap ( ) . push ( y) ;
@@ -183,7 +183,7 @@ pub fn run_make_migrations(options: MakeMigrationsOptions) -> anyhow::Result<()>
183183 x. fields . iter ( ) . filter ( |z| y. name == z. name ) . for_each ( |z| {
184184 // Check for differences
185185 if y. db_type != z. db_type || y. annotations != z. annotations {
186- if altered_fields. get ( x. name . as_str ( ) ) . is_none ( ) {
186+ if ! altered_fields. contains_key ( x. name . as_str ( ) ) {
187187 altered_fields. insert ( x. name . clone ( ) , vec ! [ ] ) ;
188188 }
189189 altered_fields. get_mut ( & x. name ) . unwrap ( ) . push ( ( y, z) ) ;
@@ -341,6 +341,7 @@ pub fn run_make_migrations(options: MakeMigrationsOptions) -> anyhow::Result<()>
341341 af. iter ( ) . for_each ( |( old, new) | {
342342 // Check datatype
343343 if old. db_type != new. db_type {
344+ #[ expect( clippy:: match_single_binding, reason = "It will be extended™" ) ]
344345 match ( old. db_type , new. db_type ) {
345346 // TODO:
346347 // There are cases where columns can be altered
0 commit comments