File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -897,6 +897,7 @@ impl<'self> Container for PostgresRow<'self> {
897897}
898898
899899impl < ' self , I : RowIndex , T : FromSql > Index < I , T > for PostgresRow < ' self > {
900+ #[ inline]
900901 fn index ( & self , idx : & I ) -> T {
901902 let idx = idx. idx ( self . stmt ) ;
902903 FromSql :: from_sql ( self . stmt . result_desc [ idx] . ty ,
@@ -909,20 +910,23 @@ pub trait RowIndex {
909910}
910911
911912impl RowIndex for uint {
913+ #[ inline]
912914 fn idx ( & self , _stmt : & NormalPostgresStatement ) -> uint {
913915 * self
914916 }
915917}
916918
917919// This is a convenience as the 0 in get[0] resolves to int :(
918920impl RowIndex for int {
921+ #[ inline]
919922 fn idx ( & self , _stmt : & NormalPostgresStatement ) -> uint {
920923 assert ! ( * self >= 0 ) ;
921924 * self as uint
922925 }
923926}
924927
925928impl < ' self > RowIndex for & ' self str {
929+ #[ inline]
926930 fn idx ( & self , stmt : & NormalPostgresStatement ) -> uint {
927931 match stmt. find_col_named ( * self ) {
928932 Some ( idx) => idx,
You can’t perform that action at this time.
0 commit comments