commit 21eda2d41a5ab57321315504cd2d0a28f7ba4cc3
parent 93fc1576b017bb6e9c3ed7b409741ecac3540919
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 22 Apr 2017 20:24:50 +0200
add LICENSE file
Diffstat:
3 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Marcel Radzio
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/log.txt b/log.txt
@@ -1 +1,22 @@
Compiling hangups v0.0.1 (file:///source)
+error[E0505]: cannot move out of `res` because it is borrowed
+ --> src/lib.rs:235:78
+ |
+235 | do_auth_step(&client, email_uri, &res, &format!("{:?}", &res.body()).as_str(), client_email, client_passwd, &res.headers());
+ | --- ^^^ move out of `res` occurs here
+ | |
+ | borrow of `res` occurs here
+
+error[E0382]: use of moved value: `res`
+ --> src/lib.rs:235:130
+ |
+235 | do_auth_step(&client, email_uri, &res, &format!("{:?}", &res.body()).as_str(), client_email, client_passwd, &res.headers());
+ | --- value moved here ^^^ value used here after move
+ |
+ = note: move occurs because `res` has type `hyper::client::Response`, which does not implement the `Copy` trait
+
+error: aborting due to 2 previous errors
+
+error: Could not compile `hangups`.
+
+To learn more, run the command again with --verbose.
diff --git a/src/lib.rs b/src/lib.rs
@@ -231,7 +231,7 @@ pub mod auth {
println!("You typed: {}", client_passwd);
// Login Step1
- let req = client.get(auth_uri).and_then(move |res| {
+ let req = client.get(auth_uri).and_then(|res| {
do_auth_step(&client, email_uri, &res, &format!("{:?}", &res.body()).as_str(), client_email, client_passwd, &res.headers());
Ok(())
})