Created
August 23, 2014 16:47
-
-
Save bartolsthoorn/843b75f257c396733c97 to your computer and use it in GitHub Desktop.
`simhash::hash` requires a `&str`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate simhash; | |
use std::sync::Future; | |
/// DOM Tree | |
pub struct Tree { | |
html: String, | |
pub hash: Future<u64> | |
} | |
impl Tree { | |
pub fn new(html: String) -> Tree { | |
Tree { | |
html: html, | |
hash: Future::spawn(proc() { simhash::hash(html.as_slice()) }) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
html.rs:13:13: 13:17 note:
html
moved here because it has typecollections::string::String
, which is non-copyable (perhaps you meant to use clone()?)