mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Accept ToString instead of AsRef<str> in Params.set() (#3732)
This commit is contained in:
@@ -726,7 +726,7 @@ impl Message {
|
||||
self.text = text;
|
||||
}
|
||||
|
||||
pub fn set_file(&mut self, file: impl AsRef<str>, filemime: Option<&str>) {
|
||||
pub fn set_file(&mut self, file: impl ToString, filemime: Option<&str>) {
|
||||
self.param.set(Param::File, file);
|
||||
if let Some(filemime) = filemime {
|
||||
self.param.set(Param::MimeType, filemime);
|
||||
|
||||
@@ -266,8 +266,8 @@ impl Params {
|
||||
}
|
||||
|
||||
/// Set the given key to the passed in value.
|
||||
pub fn set(&mut self, key: Param, value: impl AsRef<str>) -> &mut Self {
|
||||
self.inner.insert(key, value.as_ref().to_string());
|
||||
pub fn set(&mut self, key: Param, value: impl ToString) -> &mut Self {
|
||||
self.inner.insert(key, value.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user