NewSource: Rename into_source -> to_source and take reffence &self instead.

This commit is contained in:
Jordan Petridis 2018-01-27 18:34:03 +02:00
parent a3705d424b
commit fb5264c479
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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.