There's no reason for Registration::complete to take an owned string

This commit is contained in:
Paul Woolcock
2018-08-27 11:27:19 -04:00
parent 009798d17f
commit 1057e58343
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ pub fn register() -> Result<Mastodon, Box<Error>> {
println!("Click this link to authorize on Mastodon: {}", url);
let code = read_line("Paste the returned authorization code: ")?;
let mastodon = registration.complete(code)?;
let mastodon = registration.complete(&code)?;
// Save app data for using on the next run.
toml::to_file(&*mastodon, "mastodon-data.toml")?;