NewSource: Rename into_source -> to_source and take reffence &self instead.
This commit is contained in:
parent
a3705d424b
commit
fb5264c479
@ -46,7 +46,7 @@ impl NewSource {
|
||||
}
|
||||
|
||||
// Look out for when tryinto lands into stable.
|
||||
pub(crate) fn into_source(self) -> Result<Source> {
|
||||
pub(crate) fn to_source(&self) -> Result<Source> {
|
||||
self.insert_or_ignore()?;
|
||||
dbqueries::get_source_from_uri(&self.uri)
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ impl Source {
|
||||
pub fn from_url(uri: &str) -> Result<Source> {
|
||||
let url = Url::parse(&uri)?;
|
||||
|
||||
NewSource::new(&url).into_source()
|
||||
NewSource::new(&url).to_source()
|
||||
}
|
||||
|
||||
/// `Feed` constructor.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user