Skip to content

Instantly share code, notes, and snippets.

@leonardinius
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leonardinius/5c4d7d0eecf40a33f910 to your computer and use it in GitHub Desktop.
Save leonardinius/5c4d7d0eecf40a33f910 to your computer and use it in GitHub Desktop.
snippet
DEBUG:git_wayback_machine::history: make_entry: "921ebcd|Leonids Maslovs|7 days ago|Initial commit" -> ["921ebcd", "Leonids Maslovs", "7 days ago", "Initial commit"]
DEBUG:git_wayback_machine::history: Inspect 1: Entry: "921ebcd" "7 days ago" "Leonids Maslovs": "Initial commit"
DEBUG:git_wayback_machine::history: Inspect 2: Entry: "\u{233}\u{2}\u{682}\u{7f}\u{0}" "\n\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{3cc0}" "\u{f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{633}\u{2}\u{682
}\u{7f}\u{0}": "\u{682}\u{7f}\u{0}\u{0}\u{16}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}3\u{2}\u{682}\u{7f}\u{0}\u{0}\u{7}"
pub fn get_page(&self, page: i32) -> Option<Vec<Entry>> {
self.get_page_data(page)
.map(|strings| strings.into_iter()
.filter_map(|ref line| self.make_entry(line))
.inspect(|ref e| debug!("Inspect 1: {}", e))
.collect::<Vec<_>>()
.into_iter().inspect(|ref e| debug!("Inspect 2: {}", e))
.collect::<Vec<_>>()
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment