Add from(string) impl to RaSub

This commit is contained in:
Uttarayan Mondal
2021-03-27 00:51:10 +05:30
parent 646f4fa07c
commit 67d962f138
+5
View File
@@ -115,6 +115,11 @@ impl From<&str> for RaSub {
}
}
}
impl From<String> for RaSub {
fn from(name: String) -> Self {
Self::from(name.as_ref())
}
}
impl RaSub {
/// Generate subreddit object
pub fn new(name: &str) -> Self {