Merge pull request #84 from mashedcode/nit-weird-return-value-required

imp(flows) don't require present_user_url to return an additional char
This commit is contained in:
Lewin Bormann
2019-02-15 17:37:32 +01:00
committed by GitHub
2 changed files with 12 additions and 3 deletions

View File

@@ -142,7 +142,11 @@ pub trait AuthenticatorDelegate {
url);
let mut code = String::new();
io::stdin().read_line(&mut code).ok().map(|_| code)
io::stdin().read_line(&mut code).ok().map(|_| {
// Remove newline
code.pop();
code
})
} else {
println!("Please direct your browser to {} and follow the instructions displayed \
there.",