diff --git a/src/iq.rs b/src/iq.rs
index e62a4cd8..bca785e9 100644
--- a/src/iq.rs
+++ b/src/iq.rs
@@ -71,41 +71,41 @@ pub struct Iq {
impl Iq {
/// Creates an `` stanza containing a get request.
- pub fn from_get(id: String, payload: impl IqGetPayload) -> Iq {
+ pub fn from_get>(id: S, payload: impl IqGetPayload) -> Iq {
Iq {
from: None,
to: None,
- id,
+ id: id.into(),
payload: IqType::Get(payload.into()),
}
}
/// Creates an `` stanza containing a set request.
- pub fn from_set(id: String, payload: impl IqSetPayload) -> Iq {
+ pub fn from_set>(id: S, payload: impl IqSetPayload) -> Iq {
Iq {
from: None,
to: None,
- id,
+ id: id.into(),
payload: IqType::Set(payload.into()),
}
}
/// Creates an `` stanza containing a result.
- pub fn from_result(id: String, payload: Option) -> Iq {
+ pub fn from_result>(id: S, payload: Option) -> Iq {
Iq {
from: None,
to: None,
- id,
+ id: id.into(),
payload: IqType::Result(payload.map(Into::into)),
}
}
/// Creates an `` stanza containing an error.
- pub fn from_error(id: String, payload: StanzaError) -> Iq {
+ pub fn from_error>(id: S, payload: StanzaError) -> Iq {
Iq {
from: None,
to: None,
- id,
+ id: id.into(),
payload: IqType::Error(payload),
}
}