@@ -405,7 +405,7 @@ struct InnerPostgresConnection {
405405 notice_handler : Box < PostgresNoticeHandler : Send > ,
406406 notifications : RingBuf < PostgresNotification > ,
407407 cancel_data : PostgresCancelData ,
408- unknown_types : HashMap < Oid , ~ str > ,
408+ unknown_types : HashMap < Oid , StrBuf > ,
409409 desynchronized : bool ,
410410 finished : bool ,
411411 canary : u32 ,
@@ -638,7 +638,7 @@ impl InnerPostgresConnection {
638638 Ok ( ( ) )
639639 }
640640
641- fn get_type_name ( & mut self , oid : Oid ) -> PostgresResult < ~ str > {
641+ fn get_type_name ( & mut self , oid : Oid ) -> PostgresResult < StrBuf > {
642642 match self . unknown_types . find ( & oid) {
643643 Some ( name) => return Ok ( name. clone ( ) ) ,
644644 None => { }
@@ -666,7 +666,7 @@ impl InnerPostgresConnection {
666666 }
667667
668668 fn quick_query ( & mut self , query : & str )
669- -> PostgresResult < Vec < Vec < Option < ~ str > > > > {
669+ -> PostgresResult < Vec < Vec < Option < StrBuf > > > > {
670670 check_desync ! ( self ) ;
671671 try_pg ! ( self . write_messages( [ Query { query: query } ] ) ) ;
672672
@@ -676,8 +676,8 @@ impl InnerPostgresConnection {
676676 ReadyForQuery { .. } => break ,
677677 DataRow { row } => {
678678 result. push ( row. move_iter ( ) . map ( |opt| {
679- opt. map ( |b| StrBuf :: from_utf8 ( b) . unwrap ( ) . into_owned ( ) )
680- } ) . collect ( ) ) ;
679+ opt. map ( |b| StrBuf :: from_utf8 ( b) . unwrap ( ) )
680+ } ) . collect ( ) ) ;
681681 }
682682 ErrorResponse { fields } => {
683683 try!( self . wait_for_ready ( ) ) ;
@@ -746,7 +746,7 @@ impl PostgresConnection {
746746 /// let params = PostgresConnectParams {
747747 /// target: TargetUnix(some_crazy_path),
748748 /// port: None,
749- /// user: Some("postgres".to_owned ()),
749+ /// user: Some("postgres".to_strbuf ()),
750750 /// password: None,
751751 /// database: None,
752752 /// options: Vec::new(),
@@ -882,7 +882,7 @@ impl PostgresConnection {
882882 }
883883
884884 fn quick_query ( & self , query : & str )
885- -> PostgresResult < Vec < Vec < Option < ~ str > > > > {
885+ -> PostgresResult < Vec < Vec < Option < StrBuf > > > > {
886886 self . conn . borrow_mut ( ) . quick_query ( query)
887887 }
888888
@@ -1403,7 +1403,7 @@ impl<'stmt, I: RowIndex+Clone+fmt::Show, T: FromSql> Index<I, T>
14031403 /// # let mut result = stmt.query([]).unwrap();
14041404 /// # let row = result.next().unwrap();
14051405 /// let foo: i32 = row[1];
1406- /// let bar: ~str = row["bar"];
1406+ /// let bar: StrBuf = row["bar"];
14071407 /// ```
14081408 fn index ( & self , idx : & I ) -> T {
14091409 match self . get ( idx. clone ( ) ) {
0 commit comments