Add from(string) impl to RaSub
This commit is contained in:
@@ -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 {
|
impl RaSub {
|
||||||
/// Generate subreddit object
|
/// Generate subreddit object
|
||||||
pub fn new(name: &str) -> Self {
|
pub fn new(name: &str) -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user