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 {
442
442
Ok ( ( ) )
443
443
}
444
444
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 > {
448
449
self . tables
449
450
. values ( )
450
- . find ( |table| & table. name == name )
451
+ . find ( |table| & table. name == sql_name )
451
452
. map ( |rc| rc. as_ref ( ) )
452
453
}
453
454
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ fn test_layout(gql: &str) -> Layout {
26
26
#[ test]
27
27
fn table_is_sane ( ) {
28
28
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" ) ;
32
30
assert_eq ! ( SqlName :: from( "thing" ) , table. name) ;
33
31
assert_eq ! ( "Thing" , table. object. as_str( ) ) ;
34
32
You can’t perform that action at this time.
0 commit comments