@@ -1633,147 +1633,147 @@ fn test_root_block_columns_has_types() {
16331633 {
16341634 let table_db_block = table_block_nums[ "t" ] ;
16351635 assert_eq ! (
1636- ColumnType :: Single {
1636+ Some ( & ColumnType :: Single {
16371637 datatype: DataType :: Integer ,
16381638 nullable: Some ( true ) //sqlite primary key columns are nullable unless declared not null
1639- } ,
1640- root_block_cols[ & table_db_block] [ & 0 ]
1639+ } ) ,
1640+ root_block_cols[ & table_db_block] . get ( & 0 )
16411641 ) ;
16421642 assert_eq ! (
1643- ColumnType :: Single {
1643+ Some ( & ColumnType :: Single {
16441644 datatype: DataType :: Text ,
16451645 nullable: Some ( true )
1646- } ,
1647- root_block_cols[ & table_db_block] [ & 1 ]
1646+ } ) ,
1647+ root_block_cols[ & table_db_block] . get ( & 1 )
16481648 ) ;
16491649 assert_eq ! (
1650- ColumnType :: Single {
1650+ Some ( & ColumnType :: Single {
16511651 datatype: DataType :: Text ,
16521652 nullable: Some ( false )
1653- } ,
1654- root_block_cols[ & table_db_block] [ & 2 ]
1653+ } ) ,
1654+ root_block_cols[ & table_db_block] . get ( & 2 )
16551655 ) ;
16561656 }
16571657
16581658 {
16591659 let table_db_block = table_block_nums[ "i1" ] ;
16601660 assert_eq ! (
1661- ColumnType :: Single {
1661+ Some ( & ColumnType :: Single {
16621662 datatype: DataType :: Integer ,
16631663 nullable: Some ( true ) //sqlite primary key columns are nullable unless declared not null
1664- } ,
1665- root_block_cols[ & table_db_block] [ & 0 ]
1664+ } ) ,
1665+ root_block_cols[ & table_db_block] . get ( & 0 )
16661666 ) ;
16671667 assert_eq ! (
1668- ColumnType :: Single {
1668+ Some ( & ColumnType :: Single {
16691669 datatype: DataType :: Text ,
16701670 nullable: Some ( true )
1671- } ,
1672- root_block_cols[ & table_db_block] [ & 1 ]
1671+ } ) ,
1672+ root_block_cols[ & table_db_block] . get ( & 1 )
16731673 ) ;
16741674 }
16751675
16761676 {
16771677 let table_db_block = table_block_nums[ "i2" ] ;
16781678 assert_eq ! (
1679- ColumnType :: Single {
1679+ Some ( & ColumnType :: Single {
16801680 datatype: DataType :: Integer ,
16811681 nullable: Some ( true ) //sqlite primary key columns are nullable unless declared not null
1682- } ,
1683- root_block_cols[ & table_db_block] [ & 0 ]
1682+ } ) ,
1683+ root_block_cols[ & table_db_block] . get ( & 0 )
16841684 ) ;
16851685 assert_eq ! (
1686- ColumnType :: Single {
1686+ Some ( & ColumnType :: Single {
16871687 datatype: DataType :: Text ,
16881688 nullable: Some ( true )
1689- } ,
1690- root_block_cols[ & table_db_block] [ & 1 ]
1689+ } ) ,
1690+ root_block_cols[ & table_db_block] . get ( & 1 )
16911691 ) ;
16921692 }
16931693
16941694 {
16951695 let table_db_block = table_block_nums[ "t2" ] ;
16961696 assert_eq ! (
1697- ColumnType :: Single {
1697+ Some ( & ColumnType :: Single {
16981698 datatype: DataType :: Integer ,
16991699 nullable: Some ( false )
1700- } ,
1701- root_block_cols[ & table_db_block] [ & 0 ]
1700+ } ) ,
1701+ root_block_cols[ & table_db_block] . get ( & 0 )
17021702 ) ;
17031703 assert_eq ! (
1704- ColumnType :: Single {
1704+ Some ( & ColumnType :: Single {
17051705 datatype: DataType :: Null ,
17061706 nullable: Some ( true )
1707- } ,
1708- root_block_cols[ & table_db_block] [ & 1 ]
1707+ } ) ,
1708+ root_block_cols[ & table_db_block] . get ( & 1 )
17091709 ) ;
17101710 assert_eq ! (
1711- ColumnType :: Single {
1711+ Some ( & ColumnType :: Single {
17121712 datatype: DataType :: Null ,
17131713 nullable: Some ( false )
1714- } ,
1715- root_block_cols[ & table_db_block] [ & 2 ]
1714+ } ) ,
1715+ root_block_cols[ & table_db_block] . get ( & 2 )
17161716 ) ;
17171717 }
17181718
17191719 {
17201720 let table_db_block = table_block_nums[ "t2i1" ] ;
17211721 assert_eq ! (
1722- ColumnType :: Single {
1722+ Some ( & ColumnType :: Single {
17231723 datatype: DataType :: Integer ,
17241724 nullable: Some ( false )
1725- } ,
1726- root_block_cols[ & table_db_block] [ & 0 ]
1725+ } ) ,
1726+ root_block_cols[ & table_db_block] . get ( & 0 )
17271727 ) ;
17281728 assert_eq ! (
1729- ColumnType :: Single {
1729+ Some ( & ColumnType :: Single {
17301730 datatype: DataType :: Null ,
17311731 nullable: Some ( true )
1732- } ,
1733- root_block_cols[ & table_db_block] [ & 1 ]
1732+ } ) ,
1733+ root_block_cols[ & table_db_block] . get ( & 1 )
17341734 ) ;
17351735 }
17361736
17371737 {
17381738 let table_db_block = table_block_nums[ "t2i2" ] ;
17391739 assert_eq ! (
1740- ColumnType :: Single {
1740+ Some ( & ColumnType :: Single {
17411741 datatype: DataType :: Integer ,
17421742 nullable: Some ( false )
1743- } ,
1744- root_block_cols[ & table_db_block] [ & 0 ]
1743+ } ) ,
1744+ root_block_cols[ & table_db_block] . get ( & 0 )
17451745 ) ;
17461746 assert_eq ! (
1747- ColumnType :: Single {
1747+ Some ( & ColumnType :: Single {
17481748 datatype: DataType :: Null ,
17491749 nullable: Some ( false )
1750- } ,
1751- root_block_cols[ & table_db_block] [ & 1 ]
1750+ } ) ,
1751+ root_block_cols[ & table_db_block] . get ( & 1 )
17521752 ) ;
17531753 }
17541754
17551755 {
17561756 let table_db_block = table_block_nums[ "t3" ] ;
17571757 assert_eq ! (
1758- ColumnType :: Single {
1758+ Some ( & ColumnType :: Single {
17591759 datatype: DataType :: Text ,
17601760 nullable: Some ( true )
1761- } ,
1762- root_block_cols[ & table_db_block] [ & 0 ]
1761+ } ) ,
1762+ root_block_cols[ & table_db_block] . get ( & 0 )
17631763 ) ;
17641764 assert_eq ! (
1765- ColumnType :: Single {
1765+ Some ( & ColumnType :: Single {
17661766 datatype: DataType :: Float ,
17671767 nullable: Some ( false )
1768- } ,
1769- root_block_cols[ & table_db_block] [ & 1 ]
1768+ } ) ,
1769+ root_block_cols[ & table_db_block] . get ( & 1 )
17701770 ) ;
17711771 assert_eq ! (
1772- ColumnType :: Single {
1772+ Some ( & ColumnType :: Single {
17731773 datatype: DataType :: Float ,
17741774 nullable: Some ( true )
1775- } ,
1776- root_block_cols[ & table_db_block] [ & 2 ]
1775+ } ) ,
1776+ root_block_cols[ & table_db_block] . get ( & 2 )
17771777 ) ;
17781778 }
17791779}
0 commit comments