From 05dad7129a713e355fee0b3400a8571e348de081 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Tue, 7 Nov 2017 18:01:19 +0100 Subject: [PATCH] Into -> Display --- src/builder/create_embed.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/builder/create_embed.rs b/src/builder/create_embed.rs index 7a19ba780e2..06834f9f8eb 100644 --- a/src/builder/create_embed.rs +++ b/src/builder/create_embed.rs @@ -118,7 +118,7 @@ impl CreateEmbed { /// /// [`CreateEmbedField`]: struct.CreateEmbedField.html pub fn field(mut self, name: T, value: U, inline: bool) -> Self - where T: Into, U: Into { + where T: Display, U: Display { { let entry = self.0 .entry("fields") @@ -127,8 +127,8 @@ impl CreateEmbed { if let Value::Array(ref mut inner) = *entry { inner.push(json!({ "inline": inline, - "name": name.into(), - "value": value.into(), + "name": name.to_string(), + "value": value.to_string(), })); } } @@ -139,10 +139,10 @@ impl CreateEmbed { /// Adds multiple fields at once. pub fn fields(mut self, fields: It) -> Self where It: IntoIterator, - T: Into, - U: Into { + T: Display, + U: Display { for field in fields { - self = self.field(field.0.into(), field.1.into(), field.2); + self = self.field(field.0.to_string(), field.1.to_string(), field.2); } self