|
29 | 29 | //! )", []).unwrap(); |
30 | 30 | //! let me = Person { |
31 | 31 | //! id: 0, |
32 | | -//! name: "Steven".to_string(), |
| 32 | +//! name: "Steven".into_string(), |
33 | 33 | //! time_created: time::get_time(), |
34 | 34 | //! data: None |
35 | 35 | //! }; |
@@ -237,7 +237,7 @@ impl IntoConnectParams for Url { |
237 | 237 | let database = if !path.is_empty() { |
238 | 238 | // path contains the leading / |
239 | 239 | let (_, path) = path[].slice_shift_char(); |
240 | | - Some(path.to_string()) |
| 240 | + Some(path.into_string()) |
241 | 241 | } else { |
242 | 242 | None |
243 | 243 | }; |
@@ -395,14 +395,14 @@ impl InnerPostgresConnection { |
395 | 395 | canary: CANARY, |
396 | 396 | }; |
397 | 397 |
|
398 | | - options.push(("client_encoding".to_string(), "UTF8".to_string())); |
| 398 | + options.push(("client_encoding".into_string(), "UTF8".into_string())); |
399 | 399 | // Postgres uses the value of TimeZone as the time zone for TIMESTAMP |
400 | 400 | // WITH TIME ZONE values. Timespec converts to GMT internally. |
401 | | - options.push(("TimeZone".to_string(), "GMT".to_string())); |
| 401 | + options.push(("TimeZone".into_string(), "GMT".into_string())); |
402 | 402 | // We have to clone here since we need the user again for auth |
403 | | - options.push(("user".to_string(), user.user.clone())); |
| 403 | + options.push(("user".into_string(), user.user.clone())); |
404 | 404 | match database { |
405 | | - Some(database) => options.push(("database".to_string(), database)), |
| 405 | + Some(database) => options.push(("database".into_string(), database)), |
406 | 406 | None => {} |
407 | 407 | } |
408 | 408 |
|
@@ -753,7 +753,7 @@ impl PostgresConnection { |
753 | 753 | /// target: TargetUnix(some_crazy_path), |
754 | 754 | /// port: None, |
755 | 755 | /// user: Some(PostgresUserInfo { |
756 | | - /// user: "postgres".to_string(), |
| 756 | + /// user: "postgres".into_string(), |
757 | 757 | /// password: None |
758 | 758 | /// }), |
759 | 759 | /// database: None, |
@@ -827,7 +827,7 @@ impl PostgresConnection { |
827 | 827 | /// )", [])); |
828 | 828 | /// |
829 | 829 | /// let stmt = try!(conn.prepare_copy_in("foo", ["bar", "baz"])); |
830 | | - /// let data: &[&[&ToSql]] = &[&[&0i32, &"blah".to_string()], |
| 830 | + /// let data: &[&[&ToSql]] = &[&[&0i32, &"blah".into_string()], |
831 | 831 | /// &[&1i32, &None::<String>]]; |
832 | 832 | /// try!(stmt.execute(data.iter().map(|r| r.iter().map(|&e| e)))); |
833 | 833 | /// # Ok(()) }; |
|
0 commit comments