File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -442,12 +442,13 @@ impl Layout {
442442 Ok ( ( ) )
443443 }
444444
445- /// Find the table with the provided `name`. The name must exactly match
446- /// the name of an existing table. No conversions of the name are done
447- pub fn table ( & self , name : & SqlName ) -> Option < & Table > {
445+ /// Find the table with the provided `sql_name`. The name must exactly
446+ /// match the name of an existing table. No conversions of the name are
447+ /// done
448+ pub fn table ( & self , sql_name : & str ) -> Option < & Table > {
448449 self . tables
449450 . values ( )
450- . find ( |table| & table. name == name )
451+ . find ( |table| & table. name == sql_name )
451452 . map ( |rc| rc. as_ref ( ) )
452453 }
453454
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ fn test_layout(gql: &str) -> Layout {
2626#[ test]
2727fn table_is_sane ( ) {
2828 let layout = test_layout ( THING_GQL ) ;
29- let table = layout
30- . table ( & "thing" . into ( ) )
31- . expect ( "failed to get 'thing' table" ) ;
29+ let table = layout. table ( "thing" ) . expect ( "failed to get 'thing' table" ) ;
3230 assert_eq ! ( SqlName :: from( "thing" ) , table. name) ;
3331 assert_eq ! ( "Thing" , table. object. as_str( ) ) ;
3432
You can’t perform that action at this time.
0 commit comments