diff --git a/Chapter01/__old/arithmetic.rs b/Chapter01/__old/arithmetic.rs deleted file mode 100644 index b076fe4..0000000 --- a/Chapter01/__old/arithmetic.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Task : To explain assignment operations in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main(){ - // Arithmetic Operations - println!("5 + 4 = {}", 5+4 ); - println!("5 - 4 = {}", 5-4 ); - println!("5 * 4 = {}", 5*4 ); - println!("5 / 4 = {}", 5/4 ); - println!("5 % 4 = {}", 5%4 ); - - println!("********************"); - // Assigning data types and mathematical Operations - let neg_4 = -4i32; - println!("abs(-4) = {}", neg_4.abs() ); - println!("abs(-4) = {}", neg_4.pow(2) ); - println!("round(1.2345) = {}", 1.2354f64.round() ); - println!("ceil(1.2345) = {}", 1.2345f64.ceil() ); - print!("sin 3.14 = {}", 3.14f64.sin() ); -} \ No newline at end of file diff --git a/Chapter01/__old/array.rs b/Chapter01/__old/array.rs deleted file mode 100644 index 0a2bcc6..0000000 --- a/Chapter01/__old/array.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Task : To explain array in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - - // Defining an array - let rand_array = [1,2,3]; - - println!("random array {:?}",rand_array ); - // indexing starts with 0 - println!("random array 1st element {}",rand_array[0] ); - println!("random array length {}",rand_array.len() ); - // last two elements - println!("random array {:?}",&rand_array[1..3] ); -} \ No newline at end of file diff --git a/Chapter01/__old/assignment.rs b/Chapter01/__old/assignment.rs deleted file mode 100644 index 3008192..0000000 --- a/Chapter01/__old/assignment.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::io::{self, Write}; -use std::f64; - -fn main() { - println!("Let's print some lines:"); - println!(); - println!("Hello, world!"); - println!("{}, {}!", "Hello", "world"); - println!("Arguments can be referred to by their position: {0}, {1}! and {1}, {0}! are built from the same arguments", "Hello", "world"); - - println!("Furthermore the arguments can be named: \"{greeting}, {object}!\"", greeting = "Hello", object = "World"); - - println!("Number formatting: Pi is {0:.3} or {0:.0} for short", f64::consts::PI); - - println!("... and there is more: {0:>0width$}={0:>width$}={0:#x}", 1535, width = 5); - print!("Printing without newlines ... "); - println!("is great"); - - let _ = write!(&mut io::stdout(), "Underneath, it's all writing to a stream..."); - println!(); - - println!("Write something!"); - let mut input = String::new(); - if let Ok(n) = io::stdin().read_line(&mut input) { - println!("You wrote: {} ({} bytes) ", input, n); - } - else { - eprintln!("There was an error :("); - } -} - diff --git a/Chapter01/__old/boolean.rs b/Chapter01/__old/boolean.rs deleted file mode 100644 index 68b1226..0000000 --- a/Chapter01/__old/boolean.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Task : To explain boolean operations in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main(){ - //Setting boolean and character types - let bool_val: bool = true; - let x_char: char = 'a'; - - // Printing the character - println!("x char is {}", x_char); - println!("Bool value is {}", bool_val); -} \ No newline at end of file diff --git a/Chapter01/__old/calculator.rs b/Chapter01/__old/calculator.rs deleted file mode 100644 index 8b77552..0000000 --- a/Chapter01/__old/calculator.rs +++ /dev/null @@ -1,16 +0,0 @@ - -pub struct ArithmeticResults{ - sum: i32, - difference: i32, - product: i32, - quotient: f32, -} - -pub fn print_basic_arithmetics(a: i32, b: i32) -> ArithmeticResults { - ArithmeticResults { - sum: a + b, - difference: a - b, - product: a * b, - quotient: a / b - } -} \ No newline at end of file diff --git a/Chapter01/__old/decimal.rs b/Chapter01/__old/decimal.rs deleted file mode 100644 index c8faed1..0000000 --- a/Chapter01/__old/decimal.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Task : To explain assignment operations in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main(){ - // Prints the first 2 numbers after the decimal points - println!("{:.2}",1.2345 ); - - println!("================"); - // print the binary hex and octal format - println!("B: {:b} H: {:x} O: {:o}",10,10,10 ); - - println!("================"); - // Shifts - println!("{ten:>ws$}",ten=10, ws=5 ); - println!("{ten:>0ws$}",ten=10, ws=5 ); -} diff --git a/Chapter01/__old/lib.rs b/Chapter01/__old/lib.rs deleted file mode 100644 index f892636..0000000 --- a/Chapter01/__old/lib.rs +++ /dev/null @@ -1,20 +0,0 @@ -mod variables -mod mutablility -mod numbers -mod arithmetics -mod strings - -mod arrays -mod vectors -mod tuples - - - - -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - assert_eq!(2 + 2, 4); - } -} diff --git a/Chapter01/__old/mutuable.rs b/Chapter01/__old/mutuable.rs deleted file mode 100644 index 8f2bb88..0000000 --- a/Chapter01/__old/mutuable.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Task : To explain assignment operations in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main(){ - let mut sample_var = 10; - println!("Value of the sample variable is {}",sample_var); - - let sample_var = 20; - println!("New Value of the sample variable is {}",sample_var); -} \ No newline at end of file diff --git a/Chapter01/__old/sample.rs b/Chapter01/__old/sample.rs deleted file mode 100644 index 881e770..0000000 --- a/Chapter01/__old/sample.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Task : Sample program in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - println!("Welcome to Rust Cookbook"); -} \ No newline at end of file diff --git a/Chapter01/__old/string.rs b/Chapter01/__old/string.rs deleted file mode 100644 index ec29c3a..0000000 --- a/Chapter01/__old/string.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Task : To explain string in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - // declaring a random string - let rand_string = "I love Rust cookbook <3"; - - // printing the length of the string - println!("length of the string is {}",rand_string.len() ); - - // Splits in string - let (first,second) = rand_string.split_at(7); - println!("First part : {0} Second part : {1}", first,second ); - - // Count using iterator count - let count = rand_string.chars().count(); - print!("count {}",count ); - - println!("__________________________"); - // printing all chars - let mut chars = rand_string.chars(); - let mut indiv_chars = chars.next(); - - loop { - // Its like switch in c++ - match indiv_chars { - Some(x) => println!("{}",x ), - None => break - } - indiv_chars = chars.next(); - } - - println!("__________________________"); - // iterate over whitespaces - let mut iter = rand_string.split_whitespace(); - let mut indiv_word = iter.next(); - - loop { - // Its like switch in c++ - match indiv_word { - Some(x) => println!("{}",x ), - None => break - } - indiv_word = iter.next(); - } - - println!("__________________________"); - // iterate over next line - let rand_string2 = "I love \n everything about \n Rust <3"; - let mut iter_line = rand_string2.lines(); - let mut indiv_sent = iter_line.next(); - - loop { - // Its like switch in c++ - match indiv_sent { - Some(x) => println!("{}",x ), - None => break - } - indiv_sent = iter_line.next(); - } - -} diff --git a/Chapter01/__old/tuples.rs b/Chapter01/__old/tuples.rs deleted file mode 100644 index 5ec0fa0..0000000 --- a/Chapter01/__old/tuples.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Task : To explain tuples in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{i8}; - -fn main() { - - // Declaring a tuple - let rand_tuple = ("Mozilla Science Lab", 2016); - let rand_tuple2 : (&str, i8) = ("Viki",4); - - // tuple operations - println!(" Name : {}", rand_tuple2.0); - println!(" Lucky no : {}", rand_tuple2.1); - -} \ No newline at end of file diff --git a/Chapter01/__old/vector.rs b/Chapter01/__old/vector.rs deleted file mode 100644 index e0e9b74..0000000 --- a/Chapter01/__old/vector.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Task : To explain vector in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - // declaring a vector - let mut vec1 = vec![1,2,3,4,5]; - - // printing element 3 in vector - println!("Item 3 : {}", vec1[2]); - - // iterating in a vector - for i in &vec1 { - println!("{}",i ); - } - - // push an element to vector - vec1.push(6); - println!("vector after push {:?}", vec1 ); - // pop an element from vector - vec1.pop(); - println!("vector after pop {:?}", vec1 ); -} \ No newline at end of file diff --git a/Chapter02/binding b/Chapter02/binding deleted file mode 100644 index de1e6e0..0000000 Binary files a/Chapter02/binding and /dev/null differ diff --git a/Chapter02/binding.rs b/Chapter02/binding.rs deleted file mode 100644 index a3f92e6..0000000 --- a/Chapter02/binding.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Task : To explain variable binding in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 19 Feb 2017 - -fn main() { - // Simplest variable binding - let a = 5; - // pattern - let (b, c) = (1, 2); - // type annotation - let x_val: i32 = 5; - // shadow example - let y_val: i32 = 8; - { - println!("Value assigned when entering the scope : {}", y_val); // Prints "8". - let y_val = 12; - println!("Value modified within scope :{}", y_val); // Prints "12". - } - println!("Value which was assigned first : {}", y_val); // Prints "8". - let y_val = 42; - println!("New value assigned : {}", y_val); // Prints "42". - -} \ No newline at end of file diff --git a/Chapter02/closures b/Chapter02/closures deleted file mode 100644 index d41c4e8..0000000 Binary files a/Chapter02/closures and /dev/null differ diff --git a/Chapter02/closures.rs b/Chapter02/closures.rs deleted file mode 100644 index b86746e..0000000 --- a/Chapter02/closures.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Task : To explain closures in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{i32}; - -fn main() { - - // define a closure - let sum_num = |x:i32 , y:i32| x+y; - println!("7 + 8 ={}", sum_num(7,8)); - - // example 2 - let num_ten = 10; - let add_ten = |x:i32| x+num_ten; - println!("3 + 10 ={}", add_ten(3)); -} diff --git a/Chapter02/condition b/Chapter02/condition deleted file mode 100644 index 14c97c4..0000000 Binary files a/Chapter02/condition and /dev/null differ diff --git a/Chapter02/condition.rs b/Chapter02/condition.rs deleted file mode 100644 index e436733..0000000 --- a/Chapter02/condition.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Task : To explain condition in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{i32}; - -fn main() { - let age : i32= 10; - - // If else statements - if age <= 18{ - println!("Go to School"); - } else if (age >18) && (age <= 28){ - println!("Go to college"); - } else { - println!("Do something with your life"); - } - - let can_vote = if (age >= 18) {true} else {false}; - println!("Can vote {}",can_vote ); -} \ No newline at end of file diff --git a/Chapter02/constant b/Chapter02/constant deleted file mode 100644 index 60d055e..0000000 Binary files a/Chapter02/constant and /dev/null differ diff --git a/Chapter02/constant.rs b/Chapter02/constant.rs deleted file mode 100644 index 37e0795..0000000 --- a/Chapter02/constant.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Task : To explain constants in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 19 Feb 2017 - -// Global variables are declared outside scopes of other function -const UPPERLIMIT: i32 = 12; - -// function to check if bunber -fn is_big(n: i32) -> bool { - // Access constant in some function - n > UPPERLIMIT -} - -fn main() { - let random_number = 15; - - // Access constant in the main thread - println!("The threshold is {}", UPPERLIMIT); - println!("{} is {}", random_number, if is_big(random_number) { "big" } else { "small" }); - - // Error! Cannot modify a `const`. - // UPPERLIMIT = 5; - -} diff --git a/Chapter02/custom-iterators/Cargo.toml b/Chapter02/custom-iterators/Cargo.toml new file mode 100644 index 0000000..848bb62 --- /dev/null +++ b/Chapter02/custom-iterators/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "custom-iterators" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/custom-iterators/src/lib.rs b/Chapter02/custom-iterators/src/lib.rs new file mode 100644 index 0000000..02ddfd4 --- /dev/null +++ b/Chapter02/custom-iterators/src/lib.rs @@ -0,0 +1,366 @@ +//! +//! A simple singly-linked list for the Rust-Cookbook by Packt Publishing. +//! +//! Recipes covered in this module: +//! - Documenting your code +//! - Testing your documentation +//! - Writing tests and benchmarks +//! + +#![feature(test)] +#![doc( + html_logo_url = "https://blog.x5ff.xyz/img/main/logo.png", + test(no_crate_inject, attr(allow(unused_variables), deny(warnings))) +)] + +use std::cell::RefCell; +use std::rc::Rc; + +type Link = Option>>>; + +#[derive(Clone)] +struct Node +where + T: Sized + Clone, +{ + value: T, + next: Link, +} + +impl Node +where + T: Sized + Clone, +{ + fn new(value: T) -> Rc>> { + Rc::new(RefCell::new(Node { + value: value, + next: None, + })) + } +} + +/// +/// A singly-linked list, with nodes allocated on the heap using `Rc`s and `RefCell`s. Here's an image illustrating a linked list: +/// +/// +/// ![](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg) +/// +/// *Found on https://en.wikipedia.org/wiki/Linked_list* +/// +/// # Usage +/// +/// ```ignore +/// let list = List::new_empty(); +/// ``` +/// +#[derive(Clone)] +pub struct List +where + T: Sized + Clone, +{ + head: Link, + tail: Link, + + /// + /// The length of the list. + /// + pub length: usize, +} + +impl List +where + T: Sized + Clone, +{ + /// + /// Creates a new empty list. + /// + /// + /// # Example + /// + /// ``` + /// # use custom_iterators::List; + /// let list: List = List::new_empty(); + /// ``` + /// + pub fn new_empty() -> List { + List { + head: None, + tail: None, + length: 0, + } + } + + /// + /// Appends a node to the list at the end. + /// + /// + /// # Panics + /// + /// This never panics (probably). + /// + /// # Safety + /// + /// No unsafe code was used. + /// + /// # Example + /// + /// ``` + /// use custom_iterators::List; + /// + /// let mut list = List::new_empty(); + /// list.append(10); + /// ``` + /// + pub fn append(&mut self, value: T) { + let new = Node::new(value); + match self.tail.take() { + Some(old) => old.borrow_mut().next = Some(new.clone()), + None => self.head = Some(new.clone()), + }; + self.length += 1; + self.tail = Some(new); + } + + /// + /// Removes the list's head and returns the result. + /// + /// + /// # Panics + /// + /// Whenever when a node unexpectedly is `None` + /// + /// # Example + /// + /// ``` + /// # use custom_iterators::List; + /// + /// let mut list = List::new_empty(); + /// list.append(10); + /// assert_eq!(list.pop_front(), Some(10)); + /// ``` + /// + pub fn pop_front(&mut self) -> Option { + self.head.take().map(|head| { + if let Some(next) = head.borrow_mut().next.take() { + self.head = Some(next); + } else { + self.tail.take(); + } + self.length -= 1; + Rc::try_unwrap(head) + .ok() + .expect("Something is terribly wrong") + .into_inner() + .value + }) + } + + /// + /// Splits off and returns `n` nodes as a `List`. + /// + /// # Arguments + /// + /// `n: usize` - The number of elements after which to split the list. + /// + /// # Panics + /// + /// Panics when: + /// - The list is empty + /// - `n` is larger than the length + /// + /// # Example + /// + /// ``` + /// # use custom_iterators::List; + /// + /// let mut list = List::new_empty(); + /// list.append(12); + /// list.append(11); + /// list.append(10); + /// let mut list2 = list.split(1); + /// assert_eq!(list2.pop_front(), Some(12)); + /// assert_eq!(list.pop_front(), Some(11)); + /// assert_eq!(list.pop_front(), Some(10)); + /// ``` + /// + pub fn split(&mut self, n: usize) -> List { + // Don't do this in real life. Use Results, Options, or anything that + // doesn't just kill the program + if self.length == 0 || n >= self.length - 1 { + panic!("That's not working"); + } + + let mut n = n; + let mut new_list = List::new_empty(); + while n > 0 { + new_list.append(self.pop_front().unwrap()); + n -= 1; + } + new_list + } +} + +impl Drop for List +where + T: Clone + Sized, +{ + fn drop(&mut self) { + while self.length > 0 { + let n = self.pop_front(); + drop(n); + } + } +} + +/// +/// An iterator for the linked list. Consumes the list. +/// +pub struct ConsumingListIterator +where + T: Clone + Sized, +{ + list: List, +} + +impl ConsumingListIterator +where + T: Clone + Sized, +{ + /// + /// Create a new iterator for this list + /// + fn new(list: List) -> ConsumingListIterator { + ConsumingListIterator { list: list } + } +} + +impl Iterator for ConsumingListIterator +where + T: Clone + Sized, +{ + type Item = T; + + fn next(&mut self) -> Option { + self.list.pop_front() + } +} + +impl IntoIterator for List +where + T: Clone + Sized, +{ + type Item = T; + type IntoIter = ConsumingListIterator; + + fn into_iter(self) -> Self::IntoIter { + ConsumingListIterator::new(self) + } +} + +#[cfg(test)] +mod tests { + use super::*; + extern crate test; + use test::Bencher; + + #[bench] + fn bench_list_append(b: &mut Bencher) { + let mut list = List::new_empty(); + b.iter(|| { + list.append(10); + }); + } + + fn new_list(n: usize, value: Option) -> List { + let mut list = List::new_empty(); + for i in 1..=n { + if let Some(v) = value { + list.append(v); + } else { + list.append(i); + } + } + return list; + } + + #[test] + fn test_list_iterator() { + let list = new_list(4, None); + assert_eq!(list.length, 4); + + let mut iter = list.into_iter(); + assert_eq!(iter.next(), Some(1)); + assert_eq!(iter.next(), Some(2)); + assert_eq!(iter.next(), Some(3)); + assert_eq!(iter.next(), Some(4)); + assert_eq!(iter.next(), None); + + let list = new_list(4, Some(1)); + assert_eq!(list.length, 4); + + for item in list { + assert_eq!(item, 1); + } + + let list = new_list(4, Some(1)); + assert_eq!(list.length, 4); + assert_eq!(list.into_iter().fold(0, |s, e| s + e), 4); + } + + #[test] + fn test_list_new_empty() { + let mut list: List = List::new_empty(); + assert_eq!(list.length, 0); + assert_eq!(list.pop_front(), None); + } + + #[test] + fn test_list_append() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + } + + #[test] + fn test_list_pop_front() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + assert_eq!(list.pop_front(), Some(1)); + assert_eq!(list.pop_front(), Some(1)); + assert_eq!(list.pop_front(), Some(1)); + assert_eq!(list.pop_front(), Some(1)); + assert_eq!(list.pop_front(), Some(1)); + assert_eq!(list.length, 0); + assert_eq!(list.pop_front(), None); + } + + #[test] + fn test_list_split() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + let list2 = list.split(3); + assert_eq!(list.length, 2); + assert_eq!(list2.length, 3); + } + + #[test] + #[should_panic] + fn test_list_split_panics() { + let mut list: List = List::new_empty(); + let _ = list.split(3); + } +} diff --git a/Chapter02/enum b/Chapter02/enum deleted file mode 100644 index 4fa5d58..0000000 Binary files a/Chapter02/enum and /dev/null differ diff --git a/Chapter02/enum.rs b/Chapter02/enum.rs deleted file mode 100644 index 6f00a8a..0000000 --- a/Chapter02/enum.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Task : To explain enum in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - - let hulk = Hero::Strong(100); - let fasty = Hero::Fast; - //converting from - let spiderman = Hero::Info {name:"spiderman".to_owned(),secret:"peter parker".to_owned()}; - - get_info(spiderman); - get_info(hulk); - get_info(fasty); -} - -// declaring the enum -enum Hero { - Fast, - Strong(i32), - Info {name : String, secret : String} -} - -// function to perform for each types -fn get_info(h:Hero){ - match h { - Hero::Fast => println!("Fast"), - Hero::Strong(i) => println!("Lifts {} tons",i ), - Hero::Info {name,secret} => { println!(" name is : {0} secret is : {1}", name,secret);} , - } -} \ No newline at end of file diff --git a/Chapter02/enums/Cargo.toml b/Chapter02/enums/Cargo.toml new file mode 100644 index 0000000..a71b016 --- /dev/null +++ b/Chapter02/enums/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "enums" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/enums/src/lib.rs b/Chapter02/enums/src/lib.rs new file mode 100644 index 0000000..d68de78 --- /dev/null +++ b/Chapter02/enums/src/lib.rs @@ -0,0 +1,91 @@ +use std::io; + +/// +/// An enum to encapsulate errors without too much code +/// +pub enum ApplicationError { + Code { full: usize, short: u16 }, + Message(String), + IOWrapper(io::Error), + Unknown +} + +// Even enums can have an implementation! +impl ApplicationError { + + /// + /// A function to quickly write the enum's name somewhere. + /// + pub fn print_kind(&self, mut to: &mut impl io::Write) -> io::Result<()> { + // A simple match clause to react to each enum variant + let kind = match self { + ApplicationError::Code { full: _, short: _ } => "Code", + ApplicationError::Unknown => "Unknown", + ApplicationError::IOWrapper(_) => "IOWrapper", + ApplicationError::Message(_) => "Message" + }; + // the write trait lets us use any implementation and the write! macro + // using the question mark operator lets the function return early in + // case of an Err() result + write!(&mut to, "{}", kind)?; + Ok(()) + } +} + +/// +/// An arbitrary function that simulates work and returns enum variants +/// based on the input parameter. +/// +pub fn do_work(choice: i32) -> Result<(), ApplicationError> { + if choice < -100 { + Err(ApplicationError::IOWrapper(io::Error::from(io::ErrorKind::Other))) + } else if choice == 42 { + Err(ApplicationError::Code { full: choice as usize, short: (choice % u16::max_value() as i32) as u16 } ) + } else if choice > 42 { + Err(ApplicationError::Message( + format!("{} lead to a terrible error", choice) + )) + } else { + Err(ApplicationError::Unknown) + } +} + +#[cfg(test)] +mod tests { + use super::{ApplicationError, do_work}; + use std::io; + + #[test] + fn test_do_work() { + let choice = 10; + if let Err(error) = do_work(choice) { + match error { + ApplicationError::Code { full: code, short: _ } => assert_eq!(choice as usize, code), + // the following arm matches both variants (OR) + ApplicationError::Unknown | ApplicationError::IOWrapper(_) => assert!(choice < 42), + ApplicationError::Message(msg) => assert_eq!(format!("{} lead to a terrible error", choice), msg) + } + } + } + + #[test] + fn test_application_error_get_kind() { + let mut target = vec![]; + let _ = ApplicationError::Code { full: 100, short: 100 }.print_kind(&mut target); + assert_eq!(String::from_utf8(target).unwrap(), "Code".to_string()); + + let mut target = vec![]; + let _ = ApplicationError::Message("0".to_string()).print_kind(&mut target); + assert_eq!(String::from_utf8(target).unwrap(), "Message".to_string()); + + let mut target = vec![]; + let _ = ApplicationError::Unknown.print_kind(&mut target); + assert_eq!(String::from_utf8(target).unwrap(), "Unknown".to_string()); + + let mut target = vec![]; + let error = io::Error::from(io::ErrorKind::WriteZero); + let _ = ApplicationError::IOWrapper(error).print_kind(&mut target); + assert_eq!(String::from_utf8(target).unwrap(), "IOWrapper".to_string()); + + } +} diff --git a/Chapter02/expression b/Chapter02/expression deleted file mode 100644 index 412b2f4..0000000 Binary files a/Chapter02/expression and /dev/null differ diff --git a/Chapter02/expression.rs b/Chapter02/expression.rs deleted file mode 100644 index 77a17f5..0000000 --- a/Chapter02/expression.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Task : To explain constants in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 19 Feb 2017 - -// main point of execution -fn main() { - - // expression - let x_val = 5u32; - - // y block - let y_val = { - let x_squared = x_val * x_val; - let x_cube = x_squared * x_val; - - // This expression will be assigned to `y_val` - x_cube + x_squared + x_val - }; - - // z block - let z_val = { - // The semicolon suppresses this expression and `()` is assigned to `z` - 2 * x_val; - }; - - // printing the final outcomes - println!("x is {:?}", x_val); - println!("y is {:?}", y_val); - println!("z is {:?}", z_val); -} \ No newline at end of file diff --git a/Chapter02/generics/Cargo.toml b/Chapter02/generics/Cargo.toml new file mode 100644 index 0000000..f66109e --- /dev/null +++ b/Chapter02/generics/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "generics" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/generics/src/lib.rs b/Chapter02/generics/src/lib.rs new file mode 100644 index 0000000..584d19a --- /dev/null +++ b/Chapter02/generics/src/lib.rs @@ -0,0 +1,183 @@ +use std::boxed::Box; +use std::cmp; +use std::ops::Index; + +/// +/// Minimum size of a dynamic array. +/// +const MIN_SIZE: usize = 10; + +/// +/// Type declaration for readability. +/// +type Node = Option; + +/// +/// A dynamic array that can increase in capacity and behaves like +/// a list. +/// +pub struct DynamicArray +where + T: Sized + Clone, +{ + buf: Box<[Node]>, + cap: usize, + pub length: usize, +} + +impl DynamicArray +where + T: Sized + Clone, +{ + /// + /// Create a new empty dynamic array. + /// + pub fn new_empty() -> DynamicArray { + DynamicArray { + buf: vec![None; MIN_SIZE].into_boxed_slice(), + length: 0, + cap: MIN_SIZE, + } + } + + /// + /// A simple growth strategy, that at least doubles the size + /// whenever expansion is needed. Clones old content into the + /// new memory. + /// + fn grow(&mut self, min_cap: usize) { + let old_cap = self.buf.len(); + let mut new_cap = old_cap + (old_cap >> 1); + + new_cap = cmp::max(new_cap, min_cap); + new_cap = cmp::min(new_cap, usize::max_value()); + let current = self.buf.clone(); + self.cap = new_cap; + + self.buf = vec![None; new_cap].into_boxed_slice(); + self.buf[..current.len()].clone_from_slice(¤t); + } + + /// + /// Append a value to the dynamic array. + /// + pub fn append(&mut self, value: T) { + if self.length == self.cap { + self.grow(self.length + 1); + } + self.buf[self.length] = Some(value); + self.length += 1; + } + + /// + /// Retrieve an element from a specific position. + /// Clones the element. + /// + pub fn at(&mut self, index: usize) -> Node { + if self.length > index { + self.buf[index].clone() + } else { + None + } + } +} + +impl Index for DynamicArray +where + T: Sized + Clone, +{ + type Output = Node; + + fn index(&self, index: usize) -> &Self::Output { + if self.length > index { + &self.buf[index] + } else { + &None + } + } +} + +/// +/// Deep copy of the dynamic array. +/// +impl Clone for DynamicArray +where + T: Sized + Clone, +{ + fn clone(&self) -> Self { + DynamicArray { + buf: self.buf.clone(), + cap: self.cap, + length: self.length, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + + #[test] + fn dynamic_array_clone() { + let mut list = DynamicArray::new_empty(); + list.append(3.14); + let mut list2 = list.clone(); + list2.append(42.0); + assert_eq!(list[0], Some(3.14)); + assert_eq!(list[1], None); + + assert_eq!(list2[0], Some(3.14)); + assert_eq!(list2[1], Some(42.0)); + } + + + #[test] + fn dynamic_array_index() { + let mut list = DynamicArray::new_empty(); + list.append(3.14); + + assert_eq!(list[0], Some(3.14)); + let mut list = DynamicArray::new_empty(); + list.append("Hello"); + assert_eq!(list[0], Some("Hello")); + assert_eq!(list[1], None); + } + + #[test] + fn dynamic_array_2d_array() { + let mut list = DynamicArray::new_empty(); + let mut sublist = DynamicArray::new_empty(); + sublist.append(3.14); + list.append(sublist); + + assert_eq!(list.at(0).unwrap().at(0), Some(3.14)); + assert_eq!(list[0].as_ref().unwrap()[0], Some(3.14)); + + } + + + #[test] + fn dynamic_array_append() { + let mut list = DynamicArray::new_empty(); + let max: usize = 1_000; + for i in 0..max { + list.append(i as u64); + } + assert_eq!(list.length, max); + } + + #[test] + fn dynamic_array_at() { + let mut list = DynamicArray::new_empty(); + let max: usize = 1_000; + for i in 0..max { + list.append(i as u64); + } + assert_eq!(list.length, max); + for i in 0..max { + assert_eq!(list.at(i), Some(i as u64)); + } + assert_eq!(list.at(max + 1), None); + } +} diff --git a/Chapter02/implement b/Chapter02/implement deleted file mode 100644 index d419d2e..0000000 Binary files a/Chapter02/implement and /dev/null differ diff --git a/Chapter02/implement.rs b/Chapter02/implement.rs deleted file mode 100644 index af23169..0000000 --- a/Chapter02/implement.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Task : To explain struct in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{f64}; - -fn main() { - // create a struct variable - let mut circle1 = Circle { - x:10.0,radius : 10.0 - }; - - println!("x:{},radius : {}", circle1.x, circle1.radius ); - - println!("x : {}", circle1.get_x()); -} - -// define your custom user datatype -struct Circle { - x : f64, - radius : f64, -} - -// recommended way of creating structs -impl Circle { - // pub makes this function public which makes it accessible outsite the scope {} - pub fn get_x(&self) -> f64 { - self.x - } -} \ No newline at end of file diff --git a/Chapter02/iteration/Cargo.toml b/Chapter02/iteration/Cargo.toml new file mode 100644 index 0000000..ddc35ce --- /dev/null +++ b/Chapter02/iteration/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "iteration" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] + +[dev-dependencies] +rand = "^0.5" \ No newline at end of file diff --git a/Chapter02/iteration/src/lib.rs b/Chapter02/iteration/src/lib.rs new file mode 100644 index 0000000..67f3e51 --- /dev/null +++ b/Chapter02/iteration/src/lib.rs @@ -0,0 +1,93 @@ +#[cfg(test)] +mod tests { + + #[test] + fn getting_the_iterator() { + let v = vec![10, 10, 10]; + + // borrowed iterator (v remains as is) + let mut iter = v.iter(); + assert_eq!(iter.next(), Some(&10)); + assert_eq!(iter.next(), Some(&10)); + assert_eq!(iter.next(), Some(&10)); + assert_eq!(iter.next(), None); + + // owned iterator (consumes v) + // this is the same as calling into_iter() + for i in v { + assert_eq!(i, 10); + } + } + + fn count_files(path: &String) -> usize { + path.len() + } + + #[test] + fn data_transformations() { + let v = vec![10, 10, 10]; + let hexed = v.iter().map(|i| format!("{:x}", i)); + assert_eq!( + hexed.collect::>(), + vec!["a".to_string(), "a".to_string(), "a".to_string()] + ); + assert_eq!(v.iter().fold(0, |p, c| p + c), 30); + + // as an example: directories and their file count + let dirs = vec![ + "/home/alice".to_string(), + "/home/bob".to_string(), + "/home/carl".to_string(), + "/home/debra".to_string(), + ]; + + // get the no of files with some function + // based on the directory name + let file_counter = dirs.iter().map(count_files); + + // for easier handling, merge both collections into one + let dir_file_counts: Vec<(&String, usize)> = dirs.iter().zip(file_counter).collect(); + + // sorry for the messy string handling here ... + // "hello" is a &str (a slice) so either we work + // with &&str (slice reference) or &String (String reference) + // We opted for the latter. + assert_eq!( + dir_file_counts, + vec![ + (&"/home/alice".to_string(), 11), + (&"/home/bob".to_string(), 9), + (&"/home/carl".to_string(), 10), + (&"/home/debra".to_string(), 11) + ] + ) + } + + #[test] + fn data_filtering() { + let data = vec![1, 2, 3, 4, 5, 6, 7, 8]; + // a simple filter to only get the even elements. + // confirmed by an "all" function where a predicate has to apply to all elements + assert!(data.iter().filter(|&n| n % 2 == 0).all(|&n| n % 2 == 0)); + // similarly, find and position can be used to find the *first* occurance of an element + assert_eq!(data.iter().find(|&&n| n == 5), Some(&5)); + assert_eq!(data.iter().find(|&&n| n == 0), None); + assert_eq!(data.iter().position(|&n| n == 5), Some(4)); + + // we can also simply skip a number of elements + assert_eq!(data.iter().skip(1).next(), Some(&2)); + let mut data_iter = data.iter().take(2); + assert_eq!(data_iter.next(), Some(&1)); + assert_eq!(data_iter.next(), Some(&2)); + assert_eq!(data_iter.next(), None); + + // another handy use is for splitting data (e.g. for machine learning) + // this splits the original Vec into a training (~80%) and validation set (~20%) + let (validation, train): (Vec, Vec) = data + .iter() + .partition(|&_| (rand::random::() % 1.0) > 0.8); + + assert!(train.len() > validation.len()); + } + +} diff --git a/Chapter02/lifetimes/Cargo.toml b/Chapter02/lifetimes/Cargo.toml new file mode 100644 index 0000000..b8ff097 --- /dev/null +++ b/Chapter02/lifetimes/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "lifetimes" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/lifetimes/src/lib.rs b/Chapter02/lifetimes/src/lib.rs new file mode 100644 index 0000000..436edf1 --- /dev/null +++ b/Chapter02/lifetimes/src/lib.rs @@ -0,0 +1,163 @@ + +/// +/// Our almost generic statistics toolkit +/// +pub struct StatisticsToolkit<'a> { + base: &'a [f64], +} + +impl<'a> StatisticsToolkit<'a> { + + /// + /// Create a new instance if the slice is larger than 2 elements + /// + pub fn new(base: &'a [f64]) -> Option { + if base.len() < 3 { + None + } else { + Some(StatisticsToolkit { base: base }) + } + } + + /// + /// Computes the variance + /// + pub fn var(&self) -> f64 { + let mean = self.mean(); + + let ssq: f64 = self.base.iter().map(|i| (i - mean).powi(2)).sum(); + return ssq / self.base.len() as f64; + } + + + /// + /// Computes the standard deviation + /// + pub fn std(&self) -> f64 { + self.var().sqrt() + } + + /// + /// Computes the arithmetic mean + /// + pub fn mean(&self) -> f64 { + let sum: f64 = self.base.iter().sum(); + + sum / self.base.len() as f64 + } + + /// + /// Computes the median, but clones the base slice for this. + /// + pub fn median(&self) -> f64 { + let mut clone = self.base.to_vec(); + + // .sort() is not implemented for floats + clone.sort_by(|a, b| a.partial_cmp(b).unwrap()); + + let m = clone.len() / 2; + if clone.len() % 2 == 0 { + clone[m] + } else { + (clone[m] + clone[m - 1]) / 2.0 + } + } +} + +// declaring a lifetime is optional here, since the compiler automates this + +/// +/// Compute the arithmetic mean +/// +pub fn mean<'a>(numbers: &'a [f32]) -> Option { + if numbers.len() > 0 { + let sum: f32 = numbers.iter().sum(); + Some(sum / numbers.len() as f32) + } else { + None + } +} + +#[cfg(test)] +mod tests { + + use super::*; + + /// + /// a normal distribution created with numpy, with mu = 42 and sigma = 3.14 + /// + fn numpy_normal_distribution() -> Vec { + vec![ + 43.67221552, 46.40865622, 43.44603147, 43.16162571, 40.94815816, + 44.585914 , 45.84833022, 37.77765835, 40.23715928, 48.08791899, + 44.80964938, 42.13753315, 38.80713956, 39.16183586, 42.61511209, + 42.25099062, 41.2240736 , 44.59644304, 41.27516889, 36.21238554 + ] + } + + #[test] + fn mean_tests() { + // testing some aspects of the mean function + assert_eq!(mean(&vec![1.0, 2.0, 3.0]), Some(2.0)); + assert_eq!(mean(&vec![]), None); + assert_eq!(mean(&vec![0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), Some(0.0)); + } + + #[test] + fn statisticstoolkit_new() { + // require >= 3 elements in an array for a plausible normal distribution + assert!(StatisticsToolkit::new(&vec![]).is_none()); + assert!(StatisticsToolkit::new(&vec![2.0, 2.0]).is_none()); + + // a working example + assert!(StatisticsToolkit::new(&vec![1.0, 2.0, 1.0]).is_some()); + + // not a normal distribution, but we don't mind + assert!(StatisticsToolkit::new(&vec![2.0, 1.0, 2.0]).is_some()); + } + + #[test] + fn statisticstoolkit_statistics() { + // simple best case test + let a_sample = vec![1.0, 2.0, 1.0]; + let nd = StatisticsToolkit::new(&a_sample).unwrap(); + assert_eq!(nd.var(), 0.2222222222222222); + assert_eq!(nd.std(), 0.4714045207910317); + assert_eq!(nd.mean(), 1.3333333333333333); + assert_eq!(nd.median(), 1.0); + + // no variance + let a_sample = vec![1.0, 1.0, 1.0]; + let nd = StatisticsToolkit::new(&a_sample).unwrap(); + assert_eq!(nd.var(), 0.0); + assert_eq!(nd.std(), 0.0); + assert_eq!(nd.mean(), 1.0); + assert_eq!(nd.median(), 1.0); + + + // double check with a real libray + let a_sample = numpy_normal_distribution(); + let nd = StatisticsToolkit::new(&a_sample).unwrap(); + assert_eq!(nd.var(), 8.580276516670548); + assert_eq!(nd.std(), 2.9292109034124785); + assert_eq!(nd.mean(), 42.36319998250001); + assert_eq!(nd.median(), 42.61511209); + + + // skewed distribution + let a_sample = vec![1.0, 1.0, 5.0]; + let nd = StatisticsToolkit::new(&a_sample).unwrap(); + assert_eq!(nd.var(), 3.555555555555556); + assert_eq!(nd.std(), 1.8856180831641267); + assert_eq!(nd.mean(), 2.3333333333333335); + assert_eq!(nd.median(), 1.0); + + // median with even collection length + let a_sample = vec![1.0, 2.0, 3.0, 4.0] ; + let nd = StatisticsToolkit::new(&a_sample).unwrap(); + assert_eq!(nd.var(), 1.25); + assert_eq!(nd.std(), 1.118033988749895); + assert_eq!(nd.mean(), 2.5); + assert_eq!(nd.median(), 3.0); + } +} diff --git a/Chapter02/looping b/Chapter02/looping deleted file mode 100644 index 6f9094e..0000000 Binary files a/Chapter02/looping and /dev/null differ diff --git a/Chapter02/looping.rs b/Chapter02/looping.rs deleted file mode 100644 index dec2fca..0000000 --- a/Chapter02/looping.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Task : To explain looping in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -fn main() { - - // mutuable variable whose value can be changed - let mut x =1; - println!(" Loop even numbers "); - // Continously loops - loop { - // Check if x is an even number or not - if (x % 2 == 0){ - println!("{}",x); - x += 1; - // goes to the loop again - continue; - } - // exit if the number is greater than 10 - if (x > 10) { - break; - } - // increment the number when not even - x+=1; - } - - let mut y = 1; - // while loop - println!("while 1 to 9 "); - while y < 10 { - println!("{}",y ); - y +=1; - } - - let mut z = 1; - //for loop - println!(" For 1 to 9"); - for z in 1 .. 10 { - println!("{}",z ); - } - -} \ No newline at end of file diff --git a/Chapter02/mut-sharing-ownership/Cargo.toml b/Chapter02/mut-sharing-ownership/Cargo.toml new file mode 100644 index 0000000..bc9afcc --- /dev/null +++ b/Chapter02/mut-sharing-ownership/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "mut-sharing-ownership" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/mut-sharing-ownership/src/lib.rs b/Chapter02/mut-sharing-ownership/src/lib.rs new file mode 100644 index 0000000..9360e02 --- /dev/null +++ b/Chapter02/mut-sharing-ownership/src/lib.rs @@ -0,0 +1,149 @@ +#![feature(test)] + +//pub mod list; + +#[cfg(test)] +mod tests { + extern crate test; + use test::Bencher; + + #[bench] + fn bench_regular_push(b: &mut Bencher) { + let mut v = vec![]; + b.iter(|| { + for _ in 0..1_000 { + v.push(10); + } + }); + } + + #[bench] + fn bench_refcell_push(b: &mut Bencher) { + let v = RefCell::new(vec![]); + b.iter(|| { + for _ in 0..1_000 { + v.borrow_mut().push(10); + } + }); + } + + #[bench] + fn bench_cell_push(b: &mut Bencher) { + let v = Cell::new(vec![]); + b.iter(|| { + for _ in 0..1_000 { + let mut vec = v.take(); + vec.push(10); + v.set(vec); + } + }); + } + + use std::borrow::Cow; + use std::ptr::eq; + + fn min_sum_cow(min: i32, v: &mut Cow<[i32]>) { + let sum: i32 = v.iter().sum(); + if sum < min { + v.to_mut().push(min - sum); + } + } + + #[test] + fn handling_cows() { + let v = vec![10, 20, 30]; + + // cows - Copy on Writes - encapsulate the cloning process + // we'll wrap the Vec into a Cow + let mut cow = Cow::from(&v); + + // the memory locations are now the same + assert!(eq(&v[..], &*cow)); + + // ... until we pass it mutably into a mutating function + min_sum_cow(70, &mut cow); + + // on some cases, the Cow will NOT contain the + // original value! + assert_eq!(v, vec![10, 20, 30]); + assert_eq!(cow, vec![10, 20, 30, 10]); + + // both pointers are not equal either + assert!(!eq(&v[..], &*cow)); + + // retrieve the owned value. this is a clone operation + let v2 = cow.into_owned(); + + // let's repeat without mutation + let mut cow2 = Cow::from(&v2); + min_sum_cow(70, &mut cow2); + + // they are now equal ... + assert_eq!(cow2, v2); + + // ... and point to the same memory location + assert!(eq(&v2[..], &*cow2)); + } + + use std::cell::{Cell, RefCell}; + + fn min_sum_refcell(min: i32, v: &RefCell>) { + let sum: i32 = v.borrow().iter().sum(); + if sum < min { + v.borrow_mut().push(min - sum); + } + } + + fn min_sum_cell(min: i32, v: &Cell>) { + // we first take the Vec ownership + let mut vec = v.take(); + + // work with it ... + let sum: i32 = vec.iter().sum(); + + // change if needed + if sum < min { + vec.push(min - sum); + } + // then we put it back! no mut required + v.set(vec); + } + + #[test] + fn about_cells() { + // we allocate memory and use a RefCell to dynamically + // manage ownership + let ref_cell = RefCell::new(vec![10, 20, 30]); + + // mutable borrows are fine, + min_sum_refcell(70, &ref_cell); + + // they are equal! + assert!(ref_cell.borrow().eq(&vec![10, 20, 30, 10])); + + // cells are a bit different + let cell = Cell::from(vec![10, 20, 30]); + + // pass the immutable cell into the function + min_sum_cell(70, &cell); + + // unwrap + let v = cell.into_inner(); + + // check the contents, and they changed! + assert_eq!(v, vec![10, 20, 30, 10]); + } + + #[test] + #[should_panic] + fn failing_cells() { + let ref_cell = RefCell::new(vec![10, 20, 30]); + + // multiple borrows are fine + let _v = ref_cell.borrow(); + min_sum_refcell(60, &ref_cell); + + // ... until they are mutable borrows + min_sum_refcell(70, &ref_cell); // panics! + } +} diff --git a/Chapter02/mut-sharing-ownership/src/list.rs b/Chapter02/mut-sharing-ownership/src/list.rs new file mode 100644 index 0000000..54eec7f --- /dev/null +++ b/Chapter02/mut-sharing-ownership/src/list.rs @@ -0,0 +1,261 @@ +//! +//! A simple singly-linked list for the Rust-Cookbook by Packt Publishing. +//! +//! Recipes covered in this module: +//! - Documenting your code +//! - Testing your documentation +//! - Writing tests and benchmarks +//! + + +#![doc(html_logo_url = "https://blog.x5ff.xyz/img/main/logo.png", + test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))] + +use std::cell::RefCell; +use std::rc::Rc; + +type Link = Option>>>; + +#[derive(Clone)] +struct Node where T: Sized + Clone { + value: T, + next: Link, +} + + +impl Node where T: Sized + Clone { + fn new(value: T) -> Rc>> { + Rc::new(RefCell::new(Node { + value: value, + next: None, + })) + } +} + +/// +/// A singly-linked list, with nodes allocated on the heap using `Rc`s and `RefCell`s. Here's an image illustrating a linked list: +/// +/// +/// ![](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg) +/// +/// *Found on https://en.wikipedia.org/wiki/Linked_list* +/// +/// # Usage +/// +/// ```ignore +/// let list = List::new_empty(); +/// ``` +/// +#[derive(Clone)] +pub struct List where T: Sized + Clone { + head: Link, + tail: Link, + + /// + /// The length of the list. + /// + pub length: usize, +} + +impl List where T: Sized + Clone { + + /// + /// Creates a new empty list. + /// + /// + /// # Example + /// + /// ``` + /// # use mut_sharing_ownership::list::List; + /// let list: List = List::new_empty(); + /// ``` + /// + pub fn new_empty() -> List { + List { head: None, tail: None, length: 0 } + } + + /// + /// Appends a node to the list at the end. + /// + /// + /// # Panics + /// + /// This never panics (probably). + /// + /// # Safety + /// + /// No unsafe code was used. + /// + /// # Example + /// + /// ``` + /// use mut_sharing_ownership::list::List; + /// + /// let mut list = List::new_empty(); + /// list.append(10); + /// ``` + /// + pub fn append(&mut self, value: T) { + let new = Node::new(value); + match self.tail.take() { + Some(old) => old.borrow_mut().next = Some(new.clone()), + None => self.head = Some(new.clone()) + }; + self.length += 1; + self.tail = Some(new); + } + + /// + /// Removes the list's head and returns the result. + /// + /// + /// # Panics + /// + /// Whenever when a node unexpectedly is `None` + /// + /// # Example + /// + /// ``` + /// # use mut_sharing_ownership::list::List; + /// + /// let mut list = List::new_empty(); + /// list.append(10); + /// assert_eq!(list.pop(), Some(10)); + /// ``` + /// + pub fn pop(&mut self) -> Option { + self.head.take().map(|head| { + if let Some(next) = head.borrow_mut().next.take() { + self.head = Some(next); + } else { + self.tail.take(); + } + self.length -= 1; + Rc::try_unwrap(head) + .ok() + .expect("Something is terribly wrong") + .into_inner() + .value + }) + } + + + /// + /// Splits off and returns `n` nodes as a `List`. + /// + /// # Arguments + /// + /// `n: usize` - The number of elements after which to split the list. + /// + /// # Panics + /// + /// Panics when: + /// - The list is empty + /// - `n` is larger than the length + /// + /// # Example + /// + /// ``` + /// # use mut_sharing_ownership::list::List; + /// + /// let mut list = List::new_empty(); + /// list.append(12); + /// list.append(11); + /// list.append(10); + /// let mut list2 = list.split(1); + /// assert_eq!(list2.pop(), Some(12)); + /// assert_eq!(list.pop(), Some(11)); + /// assert_eq!(list.pop(), Some(10)); + /// ``` + /// + pub fn split(&mut self, n: usize) -> List { + + // Don't do this in real life. Use Results, Options, or anything that + // doesn't just kill the program + if self.length == 0 || n >= self.length - 1 { + panic!("That's not working"); + } + + let mut n = n; + let mut new_list = List::new_empty(); + while n > 0 { + new_list.append(self.pop().unwrap()); + n -= 1; + } + new_list + } +} + +impl Drop for List where T: Clone + Sized { + + fn drop(&mut self) { + while self.length > 0 { + let n = self.pop(); + drop(n); + } + } +} + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_list_new_empty() { + let mut list: List = List::new_empty(); + assert_eq!(list.length, 0); + assert_eq!(list.pop(), None); + } + + #[test] + fn test_list_append() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + } + + + #[test] + fn test_list_pop() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + assert_eq!(list.pop(), Some(1)); + assert_eq!(list.pop(), Some(1)); + assert_eq!(list.pop(), Some(1)); + assert_eq!(list.pop(), Some(1)); + assert_eq!(list.pop(), Some(1)); + assert_eq!(list.length, 0); + assert_eq!(list.pop(), None); + } + + #[test] + fn test_list_split() { + let mut list = List::new_empty(); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + list.append(1); + assert_eq!(list.length, 5); + let list2 = list.split(3); + assert_eq!(list.length, 2); + assert_eq!(list2.length, 3); + } + + #[test] + #[should_panic] + fn test_list_split_panics() { + let mut list: List = List::new_empty(); + let _ = list.split(3); + } +} diff --git a/Chapter02/not-null/Cargo.toml b/Chapter02/not-null/Cargo.toml new file mode 100644 index 0000000..5028eb0 --- /dev/null +++ b/Chapter02/not-null/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "not-null" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/not-null/src/lib.rs b/Chapter02/not-null/src/lib.rs new file mode 100644 index 0000000..55a6320 --- /dev/null +++ b/Chapter02/not-null/src/lib.rs @@ -0,0 +1,81 @@ +#[cfg(test)] +mod tests { + #[test] + #[should_panic] + fn option_unwrap() { + // Options to unwrap Options + assert_eq!(Some(10).unwrap(), 10); + assert_eq!(None.unwrap_or(10), 10); + assert_eq!(None.unwrap_or_else(|| 5 * 2), 10); + + // panic ensues + // Explicitly type None to an Option + // expect is always preferred since it has a message attached + Option::::None.unwrap(); + Option::::None.expect("Better say something when panicking"); + } + + #[test] + fn option_working_with_values() { + let mut o = Some(42); + + // take the value out and replace it with None + let nr = o.take(); + assert!(o.is_none()); + // nr now holds an option containing the value + assert_eq!(nr, Some(42)); + + let mut o = Some(42); + // sometimes it's better to replace the value right away + assert_eq!(o.replace(1535), Some(42)); + assert_eq!(o, Some(1535)); + + let o = Some(1535); + // the map() function works only on Some() values (not None) + assert_eq!(o.map(|v| format!("{:#x}", v)), Some("0x5ff".to_owned())); + + let o = Some(1535); + // Options can be transformed into a Result easily. "Nope" is the Err() + // value for the new Result. + match o.ok_or("Nope") { + Ok(nr) => assert_eq!(nr, 1535), + Err(_) => assert!(false), + } + } + + #[test] + fn option_sequentials() { + // Options have a range of abilities and sometimes even behave like sequences + let a = Some(42); + let b = Some(1535); + // boolean logic with options. Note the returned values + assert_eq!(a.and(b), Some(1535)); + assert_eq!(a.and(Option::::None), None); + assert_eq!(a.or(None), Some(42)); + assert_eq!(a.or(b), Some(42)); + assert_eq!(None.or(a), Some(42)); + + // chain together Option instances to skip tedious unwrapping + let new_a = a.and_then(|v| Some(v + 100)).filter(|&v| v != 42); + + // iterate over Options + assert_eq!(new_a, Some(142)); + let mut a_iter = new_a.iter(); + assert_eq!(a_iter.next(), Some(&142)); + assert_eq!(a_iter.next(), None); + } + + #[test] + fn option_pattern_matching() { + match Some(100) { + Some(v) => assert_eq!(v, 100), + None => assert!(false), + }; + + if let Some(v) = Some(42) { + assert_eq!(v, 42); + } else { + assert!(false); + } + } +} diff --git a/Chapter02/pattern-matching/Cargo.toml b/Chapter02/pattern-matching/Cargo.toml new file mode 100644 index 0000000..2a72514 --- /dev/null +++ b/Chapter02/pattern-matching/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "pattern-matching" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/pattern-matching/src/main.rs b/Chapter02/pattern-matching/src/main.rs new file mode 100644 index 0000000..3e7b23a --- /dev/null +++ b/Chapter02/pattern-matching/src/main.rs @@ -0,0 +1,136 @@ + +enum Background { + Color(u8, u8, u8), + Image(&'static str), +} + +enum UserType { + Casual, + Power +} + +struct MyApp { + theme: Background, + user_type: UserType, + secret_user_id: usize +} + +fn guarded_match(app: MyApp) -> String { + match app { + MyApp { secret_user_id: uid, .. } if uid <= 100 => "You are an early bird!".to_owned(), + MyApp { .. } => "Thank you for also joining".to_owned() + } +} + +fn destructuring_match(app: MyApp) -> String { + match app { + MyApp { user_type: UserType::Power, + secret_user_id: uid, + theme: Background::Color(b1, b2, b3) } => + format!("A power user with id >{}< and color background (#{:02x}{:02x}{:02x})", uid, b1, b2, b3), + MyApp { user_type: UserType::Power, + secret_user_id: uid, + theme: Background::Image(path) } => + format!("A power user with id >{}< and image background (path: {})", uid, path), + MyApp { user_type: _, secret_user_id: uid, .. } => format!("A regular user with id >{}<, individual backgrounds not supported", uid), + } +} + +fn literal_match(choice: usize) -> String { + match choice { + 0 | 1 => "zero or one".to_owned(), + 2 ... 9 => "two to nine".to_owned(), + 10 => "ten".to_owned(), + _ => "anything else".to_owned() + } +} + +fn literal_str_match(choice: &str) -> String { + match choice { + "🏋️" => "Power lifting".to_owned(), + "🏈" => "Football".to_owned(), + "🥋" => "BJJ".to_owned(), + _ => "Competitive BBQ".to_owned() + } +} + + +fn reference_match(m: &Option<&str>) -> String { + match m { + Some(ref s) => s.to_string(), + _ => "Nothing".to_string() + } +} + +fn tuple_match(choices: (i32, i32, i32, i32)) -> String { + match choices { + (_, second, _, fourth) => format!("Numbers at positions 1 and 3 are {} and {} respectively", second, fourth) + } +} + + +pub fn main() { + let opt = Some(42); + // the most common match: + match opt { + Some(nr) => println!("Got {}", nr), + // _ matches everything else as a placeholder for + // don't care. + _ => println!("Found None") + } + println!(); + println!("Literal match for 0: {}", literal_match(0)); + println!("Literal match for 10: {}", literal_match(10)); + println!("Literal match for 100: {}", literal_match(100)); + + println!(); + println!("Literal match for 0: {}", tuple_match((0, 10, 0, 100))); + + println!(); + let mystr = Some("Hello"); + println!("Mathing on a reference: {}", reference_match(&mystr)); + println!("It's still owned here: {:?}", mystr); + + println!(); + let power = MyApp { + secret_user_id: 99, + theme: Background::Color(255, 255, 0), + user_type: UserType::Power + }; + println!("Destructuring a power user: {}", destructuring_match(power)); + + let casual = MyApp { + secret_user_id: 10, + theme: Background::Image("my/fav/image.png"), + user_type: UserType::Casual + }; + println!("Destructuring a casual user: {}", destructuring_match(casual)); + + let power2 = MyApp { + secret_user_id: 150, + theme: Background::Image("a/great/landscape.png"), + user_type: UserType::Power + }; + println!("Destructuring another power user: {}", destructuring_match(power2)); + + println!(); + let early = MyApp { + secret_user_id: 4, + theme: Background::Color(255, 255, 0), + user_type: UserType::Power + }; + println!("Guarded matching (early): {}", guarded_match(early)); + + let not_so_early = MyApp { + secret_user_id: 1003942, + theme: Background::Color(255, 255, 0), + user_type: UserType::Power + }; + println!("Guarded matching (late): {}", guarded_match(not_so_early)); + println!(); + + println!("Literal match for 🥋: {}", literal_str_match("🥋")); + println!("Literal match for 🏈: {}", literal_str_match("🏈")); + println!("Literal match for 🏋️: {}", literal_str_match("🏋️")); + println!("Literal match for ⛳: {}", literal_str_match("⛳")); +} \ No newline at end of file diff --git a/Chapter02/pointer b/Chapter02/pointer deleted file mode 100644 index 56ac100..0000000 Binary files a/Chapter02/pointer and /dev/null differ diff --git a/Chapter02/pointer.rs b/Chapter02/pointer.rs deleted file mode 100644 index ab23de8..0000000 --- a/Chapter02/pointer.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Task : To explain pointers in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{i32}; - -fn main() { - - let vect1 = vec![1,2,3]; - - // Error in case you are doing this in case of non primitive value - // let vec2 = vec1 - // println!("vec1[0] : {:?}", vec1[0]); - - let prim_val = 1; - let prim_val2 = prim_val; - println!("primitive value :- {}", prim_val); - - // passing the ownership to the function - println!("Sum of vects : {}", sum_vects(&vect1)); - // Able to pass the non primitive data type - println!("vector 1 {:?}", vect1); -} - -// Added a reference in the argument -fn sum_vects (v1: &Vec) -> i32 { - // apply a closure and iterator - let sum = v1.iter().fold(0, |mut sum, &x | {sum += x; sum}); - return sum; -} \ No newline at end of file diff --git a/Chapter02/sharing-ownership/Cargo.toml b/Chapter02/sharing-ownership/Cargo.toml new file mode 100644 index 0000000..4d06008 --- /dev/null +++ b/Chapter02/sharing-ownership/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "sharing-ownership" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/sharing-ownership/src/lib.rs b/Chapter02/sharing-ownership/src/lib.rs new file mode 100644 index 0000000..40b100e --- /dev/null +++ b/Chapter02/sharing-ownership/src/lib.rs @@ -0,0 +1,68 @@ +#![feature(test)] + + +#[cfg(test)] +mod tests { + extern crate test; + use std::rc::Rc; + use test::{black_box, Bencher}; + + /// + /// A length function that takes ownership of the input variable + /// + fn length(s: String) -> usize { + s.len() + } + + /// + /// The same length function, taking ownership of a Rc + /// + fn rc_length(s: Rc) -> usize { + s.len() // calls to the wrapped object require no additions + } + + #[bench] + fn bench_string_clone(b: &mut Bencher) { + let s: String = (0..100_000).map(|_| 'a').collect(); + b.iter(|| { + black_box(length(s.clone())); + }); + } + + #[bench] + fn bench_string_rc(b: &mut Bencher) { + let s: String = (0..100_000).map(|_| 'a').collect(); + let rc_s = Rc::new(s); + b.iter(|| { + black_box(rc_length(rc_s.clone())); + }); + } + + + #[test] + fn cloning() { + let s = "abcdef".to_owned(); + assert_eq!(length(s), 6); + // s is now "gone", we can't use it anymore + // therefore we can't use it in a loop either! + // ... unless we clone s - at a cost! (see benchmark) + let s = "abcdef".to_owned(); + + for _ in 0..10 { + // clone is typically an expensive deep copy + assert_eq!(length(s.clone()), 6); + } + } + + #[test] + fn refcounting() { + let s = Rc::new("abcdef".to_owned()); + // we can clone Rc (reference counters) with low cost + assert_eq!(rc_length(s.clone()), 6); + + for _ in 0..10 { + // clone is typically an expensive deep copy + assert_eq!(rc_length(s.clone()), 6); + } + } +} diff --git a/Chapter02/struct b/Chapter02/struct deleted file mode 100644 index d90a8af..0000000 Binary files a/Chapter02/struct and /dev/null differ diff --git a/Chapter02/struct.rs b/Chapter02/struct.rs deleted file mode 100644 index d77784d..0000000 --- a/Chapter02/struct.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Task : To explain struct in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{f64}; - -fn main() { - // create a struct variable - let mut circle1 = Circle { - x:10.0,radius : 10.0 - }; - - println!("x:{},radius : {}", circle1.x, circle1.radius ); - - println!("Radius : {}", get_radius(&circle1) ); - -} - -// define your custom user datatype -struct Circle { - x : f64, - radius : f64, -} - -// function which return radius -fn get_radius(c1 : &Circle) -> f64{ - c1.radius -} diff --git a/Chapter02/trait b/Chapter02/trait deleted file mode 100644 index 70ea517..0000000 Binary files a/Chapter02/trait and /dev/null differ diff --git a/Chapter02/trait-bounds/Cargo.toml b/Chapter02/trait-bounds/Cargo.toml new file mode 100644 index 0000000..78d1526 --- /dev/null +++ b/Chapter02/trait-bounds/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "trait-bounds" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/trait-bounds/src/main.rs b/Chapter02/trait-bounds/src/main.rs new file mode 100644 index 0000000..6b51de9 --- /dev/null +++ b/Chapter02/trait-bounds/src/main.rs @@ -0,0 +1,40 @@ +use std::fmt::Debug; + +/// +/// An interface that can be used for quick and easy logging +/// +pub trait Loggable: Debug + Sized { + fn log(self) { + println!("{:?}", &self) + } +} +/// +/// A simple print function for printing debug formatted variables +/// +fn log_debug(t: T) { + println!("{:?}", t); +} + +#[derive(Debug)] +struct ArbitraryType { + v: Vec +} + +impl ArbitraryType { + pub fn new() -> ArbitraryType { + ArbitraryType { + v: vec![1,2,3,4] + } + } +} +impl Loggable for ArbitraryType {} + +#[derive(Debug)] +struct AnotherType(usize); + +fn main() { + let a = ArbitraryType::new(); + a.log(); + let b = AnotherType(2); + log_debug(b); +} diff --git a/Chapter02/trait.rs b/Chapter02/trait.rs deleted file mode 100644 index 4a9b1ca..0000000 --- a/Chapter02/trait.rs +++ /dev/null @@ -1,51 +0,0 @@ -// Task : To explain trait in rust -// Author : Vigneshwer -// Version : 1.0 -// Date : 3 Dec 2016 - -use std::{f64}; - -fn main() { - - // variable of circle datatype - let mut circle1 = Circle { - r : 10.0 - }; - println!("Area of circle {}", circle1.area() ); - - // variable of rectangle datatype - let mut rect = Rectangle { - h:10.0,b : 10.0 - }; - println!("Area of rectangle {}", rect.area() ); -} - -// userdefined datatype rectangle -struct Rectangle { - h: f64, - b: f64, -} - -// userdefined datatype circle -struct Circle { - r: f64, -} - -// create a functionality for the datatypes -trait HasArea { - fn area(&self) -> f64; -} - -// implement area for circle -impl HasArea for Circle { - fn area(&self) -> f64 { - 3.14 * (self.r *self.r) - } -} - -// implement area for rectangle -impl HasArea for Rectangle { - fn area(&self) -> f64 { - self.h *self.b - } -} \ No newline at end of file diff --git a/Chapter02/typecasting b/Chapter02/typecasting deleted file mode 100644 index 107ad3d..0000000 Binary files a/Chapter02/typecasting and /dev/null differ diff --git a/Chapter02/typecasting.rs b/Chapter02/typecasting.rs deleted file mode 100644 index db1d7cd..0000000 --- a/Chapter02/typecasting.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Task: Performing type casting in rust -// Date: 11 Feb 2016 -// Version: 0.0.1 -// Author: Vigneshwer - -use std::{i32,f32}; - -// Sample function for assigning values to confusion matrix -fn main() { - -// assigning random values to the confusion matrix -let(true_positive,true_negative,false_positive,false_negative)=(100,50,10,5); - -// define a total closure -let total = true_positive + true_negative + false_positive + false_negative; - -println!("The total predictions {}",total); - -// Calculating the accuracy of the model -println!("Accuracy of the model {:.2}",percentage(accuracy(true_positive,true_negative,total))); - -} - -// Accuracy Measures the overall performance of the model -fn accuracy(tp:i32,tn:i32,total:i32) -> f32 { - // if semi-colon is not put then that returns - // No automatic type cast in rust - (tp as f32 + tn as f32 )/(total as f32) -} - -// Converting to percentage -fn percentage(value:f32) -> f32 { - value as f32 *100.0 -} \ No newline at end of file diff --git a/Chapter02/unsafe-ways/Cargo.toml b/Chapter02/unsafe-ways/Cargo.toml new file mode 100644 index 0000000..3d0a2a8 --- /dev/null +++ b/Chapter02/unsafe-ways/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "unsafe-ways" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter02/unsafe-ways/src/lib.rs b/Chapter02/unsafe-ways/src/lib.rs new file mode 100644 index 0000000..6e171d1 --- /dev/null +++ b/Chapter02/unsafe-ways/src/lib.rs @@ -0,0 +1,44 @@ +#![allow(dead_code)] +use std::slice; + +fn split_into_equal_parts(slice: &mut [T], parts: usize) -> Vec<&mut [T]> { + let len = slice.len(); + assert!(parts <= len); + let step = len / parts; + unsafe { + let ptr = slice.as_mut_ptr(); + + (0..step + 1) + .map(|i| { + let offset = (i * step) as isize; + let a = ptr.offset(offset); + slice::from_raw_parts_mut(a, step) + }) + .collect() + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn test_str_to_bytes_horribly_unsafe() { + let bytes = unsafe { std::mem::transmute::<&str, &[u8]>("Going off the menu") }; + assert_eq!( + bytes, + &[ + 71, 111, 105, 110, 103, 32, 111, 102, 102, 32, 116, 104, 101, 32, 109, 101, 110, + 117 + ] + ); + } + + #[test] + fn test_split_into_equal_parts() { + let mut v = vec![1, 2, 3, 4, 5, 6]; + assert_eq!( + split_into_equal_parts(&mut v, 3), + &[&[1, 2], &[3, 4], &[5, 6]] + ); + } +} diff --git a/Chapter03/cargo-hello/Cargo.toml b/Chapter03/cargo-hello/Cargo.toml new file mode 100644 index 0000000..9c4f894 --- /dev/null +++ b/Chapter03/cargo-hello/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "cargo-hello" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter03/cargo-hello/src/main.rs b/Chapter03/cargo-hello/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/Chapter03/cargo-hello/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/Chapter03/custom-build/.cargo/config b/Chapter03/custom-build/.cargo/config new file mode 100644 index 0000000..c4cc888 --- /dev/null +++ b/Chapter03/custom-build/.cargo/config @@ -0,0 +1,12 @@ +[cargo-new] +# This is your name/email to place in the `authors` section of a new Cargo.toml +# that is generated. If not present, then `git` will be probed, and if that is +# not present then `$USER` and `$EMAIL` will be used. +name = "..." +email = "..." + + +[build] +jobs = 4 +target = "wasm32-unknown-unknown" +target-dir = "out" diff --git a/Chapter03/custom-build/Cargo.toml b/Chapter03/custom-build/Cargo.toml new file mode 100644 index 0000000..58cbbb5 --- /dev/null +++ b/Chapter03/custom-build/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "custom-build" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] + + +# Let's modify the release build +[profile.release] +opt-level = 2 +incremental = true # default is false +overflow-checks = true \ No newline at end of file diff --git a/Chapter03/custom-build/out/.rustc_info.json b/Chapter03/custom-build/out/.rustc_info.json new file mode 100644 index 0000000..040aac2 --- /dev/null +++ b/Chapter03/custom-build/out/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":2823603757898662870,"outputs":{"6217262102979750783":["___.wasm\nlib___.rlib\n___.wasm\nlib___.a\n/home/cm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"wasm32\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"cas\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"unknown\"\ntarget_pointer_width=\"32\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`\n\nwarning: dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`\n\n"],"1617349019360157463":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/cm/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"mmx\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"cas\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"1164083562126845933":["rustc 1.35.0-nightly (aa99abeb2 2019-04-14)\nbinary: rustc\ncommit-hash: aa99abeb262307d5e9aa11a792312fd620b7f89a\ncommit-date: 2019-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.35.0-nightly\nLLVM version: 8.0\n",""]},"successes":{}} \ No newline at end of file diff --git a/Chapter03/rand/target/debug/_cargo-lock b/Chapter03/custom-build/out/debug/.cargo-lock similarity index 100% rename from Chapter03/rand/target/debug/_cargo-lock rename to Chapter03/custom-build/out/debug/.cargo-lock diff --git a/Chapter05/sample_rayon/target/debug/_cargo-lock b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.cargo-lock similarity index 100% rename from Chapter05/sample_rayon/target/debug/_cargo-lock rename to Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.cargo-lock diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build new file mode 100644 index 0000000..57d69c8 --- /dev/null +++ b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build @@ -0,0 +1 @@ +6103dbe66b1c1499 \ No newline at end of file diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build.json b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build.json new file mode 100644 index 0000000..de352c7 --- /dev/null +++ b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/bin-custom-build.json @@ -0,0 +1 @@ +{"rustc":6657857933646595371,"features":"[]","target":8081900203599542089,"profile":14996655781355331481,"path":1036222786711178230,"deps":[],"local":[{"MtimeBased":[[1555702721,688522520],"/home/cm/workspace/Mine/Rust-Cookbook/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/dep-bin-custom-build"]}],"rustflags":[],"metadata":14007051628862413002} \ No newline at end of file diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/dep-bin-custom-build b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/dep-bin-custom-build new file mode 100644 index 0000000..e046c38 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/dep-bin-custom-build differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/invoked.timestamp b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/.fingerprint/custom-build-0354a0e8029ace12/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.d b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.d new file mode 100644 index 0000000..a641861 --- /dev/null +++ b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.d @@ -0,0 +1 @@ +/home/cm/workspace/Mine/Rust-Cookbook/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.wasm: /home/cm/workspace/Mine/Rust-Cookbook/Chapter03/custom-build/src/main.rs diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.wasm b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.wasm new file mode 100755 index 0000000..e26d108 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/custom-build.wasm differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom-build.wasm b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom-build.wasm new file mode 100755 index 0000000..e26d108 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom-build.wasm differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom_build.d b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom_build.d new file mode 100644 index 0000000..0dd46ee --- /dev/null +++ b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom_build.d @@ -0,0 +1,5 @@ +/home/cm/workspace/Mine/Rust-Cookbook/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom_build.wasm: src/main.rs + +/home/cm/workspace/Mine/Rust-Cookbook/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/deps/custom_build.d: src/main.rs + +src/main.rs: diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/17qpdxgdr8171a95.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/17qpdxgdr8171a95.o new file mode 100644 index 0000000..c849196 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/17qpdxgdr8171a95.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/1mfdh5801mmv9mwx.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/1mfdh5801mmv9mwx.o new file mode 100644 index 0000000..991edf8 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/1mfdh5801mmv9mwx.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2a89ztvaiiods4oh.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2a89ztvaiiods4oh.o new file mode 100644 index 0000000..a049ea4 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2a89ztvaiiods4oh.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2jd552wq4i6co2ri.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2jd552wq4i6co2ri.o new file mode 100644 index 0000000..c5be11f Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/2jd552wq4i6co2ri.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/3olynzyazqw81hh.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/3olynzyazqw81hh.o new file mode 100644 index 0000000..46c19f6 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/3olynzyazqw81hh.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/4ixbd5qd2cuq9cnq.o b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/4ixbd5qd2cuq9cnq.o new file mode 100644 index 0000000..ff3f021 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/4ixbd5qd2cuq9cnq.o differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/dep-graph.bin b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/dep-graph.bin new file mode 100644 index 0000000..9f3db37 Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/dep-graph.bin differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/query-cache.bin b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/query-cache.bin new file mode 100644 index 0000000..071172f Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/query-cache.bin differ diff --git a/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/work-products.bin b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/work-products.bin new file mode 100644 index 0000000..631c74a Binary files /dev/null and b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6-2dsvkef93pfb2/work-products.bin differ diff --git a/Chapter09/nickel-demo/target/debug/_cargo-lock b/Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6.lock old mode 100644 new mode 100755 similarity index 100% rename from Chapter09/nickel-demo/target/debug/_cargo-lock rename to Chapter03/custom-build/out/wasm32-unknown-unknown/debug/incremental/custom_build-2xa9c0dk2axzj/s-fbg7ypgl9l-1rxjcc6.lock diff --git a/Chapter03/custom-build/src/main.rs b/Chapter03/custom-build/src/main.rs new file mode 100644 index 0000000..3eb326e --- /dev/null +++ b/Chapter03/custom-build/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Overflow! {}", 128 + 129); +} diff --git a/Chapter03/external-deps/Cargo.toml b/Chapter03/external-deps/Cargo.toml new file mode 100644 index 0000000..4b3594d --- /dev/null +++ b/Chapter03/external-deps/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "external-deps" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +regex = { git = "https://github.com/rust-lang/regex" } # bleeding edge libraries + +# specifying crate features +serde = { version = "1", features = ["derive"] } +serde_json = "*" # pick whatever version + + +[dev-dependencies] +criterion = "0.2.11" + + +[[bench]] +name = "cooking_with_rust" +harness = false \ No newline at end of file diff --git a/Chapter03/external-deps/benches/cooking_with_rust.rs b/Chapter03/external-deps/benches/cooking_with_rust.rs new file mode 100644 index 0000000..2952599 --- /dev/null +++ b/Chapter03/external-deps/benches/cooking_with_rust.rs @@ -0,0 +1,32 @@ +#[macro_use] +extern crate criterion; + +use criterion::black_box; +use criterion::Criterion; + +pub fn bubble_sort(collection: &[T]) -> Vec { + let mut result: Vec = collection.into(); + for _ in 0..result.len() { + let mut swaps = 0; + for i in 1..result.len() { + if result[i - 1] > result[i] { + result.swap(i - 1, i); + swaps += 1; + } + } + if swaps == 0 { + break; + } + } + result +} + +fn bench_bubble_sort_1k_asc(c: &mut Criterion) { + c.bench_function("Bubble sort 1k descending numbers", |b| { + let items: Vec = (0..1_000).rev().collect(); + b.iter(|| black_box(bubble_sort(&items))) + }); +} + +criterion_group!(benches, bench_bubble_sort_1k_asc); +criterion_main!(benches); diff --git a/Chapter03/external-deps/src/main.rs b/Chapter03/external-deps/src/main.rs new file mode 100644 index 0000000..3b1b1e9 --- /dev/null +++ b/Chapter03/external-deps/src/main.rs @@ -0,0 +1,28 @@ +use regex::Regex; +use serde::Serialize; + +#[derive(Serialize)] +struct Person { + pub full_name: String, + pub call_me: String, + pub age: usize, +} + +fn main() { + let a_person = Person { + full_name: "John Smith".to_owned(), + call_me: "Smithy".to_owned(), + age: 42, + }; + let serialized = serde_json::to_string(&a_person).unwrap(); + println!("A serialized Person instance: {}", serialized); + + let re = Regex::new(r"(?x)(?P\d{4})-(?P\d{2})-(?P\d{2})").unwrap(); + println!("Some regex parsing:"); + let d = "2019-01-31"; + println!(" Is {} valid? {}", d, re.captures(d).is_some()); + let d = "9999-99-00"; + println!(" Is {} valid? {}", d, re.captures(d).is_some()); + let d = "2019-1-10"; + println!(" Is {} valid? {}", d, re.captures(d).is_some()); +} diff --git a/Chapter03/my-workspace/Cargo.toml b/Chapter03/my-workspace/Cargo.toml new file mode 100644 index 0000000..aa0184d --- /dev/null +++ b/Chapter03/my-workspace/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] + +members = [ "a-lib", "a-project" ] diff --git a/Chapter03/my-workspace/a-lib/.gitignore b/Chapter03/my-workspace/a-lib/.gitignore new file mode 100644 index 0000000..6936990 --- /dev/null +++ b/Chapter03/my-workspace/a-lib/.gitignore @@ -0,0 +1,3 @@ +/target +**/*.rs.bk +Cargo.lock diff --git a/Chapter03/my-workspace/a-lib/Cargo.toml b/Chapter03/my-workspace/a-lib/Cargo.toml new file mode 100644 index 0000000..58ba8e3 --- /dev/null +++ b/Chapter03/my-workspace/a-lib/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "a-lib" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dev-dependencies] +rand = "*" \ No newline at end of file diff --git a/Chapter03/my-workspace/a-lib/src/lib.rs b/Chapter03/my-workspace/a-lib/src/lib.rs new file mode 100644 index 0000000..17c0851 --- /dev/null +++ b/Chapter03/my-workspace/a-lib/src/lib.rs @@ -0,0 +1,30 @@ +use std::fmt::Debug; + +pub fn stringify(v: &T) -> String { + format!("{:#?}", v) +} + +#[cfg(test)] +mod tests { + use rand::prelude::*; + use super::stringify; + + #[test] + fn test_numbers() { + let a_nr: f64 = random(); + assert_eq!(stringify(&a_nr), format!("{:#?}", a_nr)); + assert_eq!(stringify(&1i32), "1"); + assert_eq!(stringify(&1usize), "1"); + assert_eq!(stringify(&1u32), "1"); + assert_eq!(stringify(&1i64), "1"); + } + + #[test] + fn test_sequences() { + assert_eq!(stringify(&vec![0, 1, 2]), "[\n 0,\n 1,\n 2,\n]"); + assert_eq!( + stringify(&(1, 2, 3, 4)), + "(\n 1,\n 2,\n 3,\n 4,\n)" + ); + } +} diff --git a/Chapter03/my-workspace/a-project/.gitignore b/Chapter03/my-workspace/a-project/.gitignore new file mode 100644 index 0000000..53eaa21 --- /dev/null +++ b/Chapter03/my-workspace/a-project/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/Chapter03/my-workspace/a-project/Cargo.toml b/Chapter03/my-workspace/a-project/Cargo.toml new file mode 100644 index 0000000..9cd3762 --- /dev/null +++ b/Chapter03/my-workspace/a-project/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "a-project" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +a-lib = { path = "../a-lib" } +rand = "0.5" \ No newline at end of file diff --git a/Chapter03/my-workspace/a-project/src/main.rs b/Chapter03/my-workspace/a-project/src/main.rs new file mode 100644 index 0000000..794c949 --- /dev/null +++ b/Chapter03/my-workspace/a-project/src/main.rs @@ -0,0 +1,6 @@ +use a_lib::stringify; +use rand::prelude::*; + +fn main() { + println!("{{ \"values\": {}, \"sensor\": {} }}", stringify(&vec![random::(); 6]), stringify(&"temperature")); +} diff --git a/Chapter03/publish-crate b/Chapter03/publish-crate new file mode 160000 index 0000000..4d7f00b --- /dev/null +++ b/Chapter03/publish-crate @@ -0,0 +1 @@ +Subproject commit 4d7f00bfeb252c6ecfc8ad3b107c9260396bc046 diff --git a/Chapter03/rand/Cargo.lock b/Chapter03/rand/Cargo.lock deleted file mode 100644 index 60da00f..0000000 --- a/Chapter03/rand/Cargo.lock +++ /dev/null @@ -1,21 +0,0 @@ -[root] -name = "rand" -version = "0.3.15" -dependencies = [ - "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "684f330624d8c3784fb9558ca46c4ce488073a8d22450415c5eb4f4cfb0d11b5" -"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" diff --git a/Chapter03/rand/Cargo.toml b/Chapter03/rand/Cargo.toml deleted file mode 100644 index 755b6f1..0000000 --- a/Chapter03/rand/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] - -name = "rand" -version = "0.3.15" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/rand" -documentation = "https://doc.rust-lang.org/rand" -homepage = "https://github.com/rust-lang/rand" -description = """ -Random number generators and other randomness functionality. -""" -keywords = ["random", "rng"] -categories = ["algorithms"] - -[dependencies] -libc = "0.2" - -[dev-dependencies] -log = "0.3.0" diff --git a/Chapter03/rand/LICENSE-APACHE b/Chapter03/rand/LICENSE-APACHE deleted file mode 100644 index 16fe87b..0000000 --- a/Chapter03/rand/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Chapter03/rand/LICENSE-MIT b/Chapter03/rand/LICENSE-MIT deleted file mode 100644 index 39d4bdb..0000000 --- a/Chapter03/rand/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014 The Rust Project Developers - -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/Chapter03/rand/README.md b/Chapter03/rand/README.md deleted file mode 100644 index 5261584..0000000 --- a/Chapter03/rand/README.md +++ /dev/null @@ -1,52 +0,0 @@ -rand -==== - -A Rust library for random number generators and other randomness functionality. - -[![Build Status](https://travis-ci.org/rust-lang-nursery/rand.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/rand) -[![Build status](https://ci.appveyor.com/api/projects/status/rm5c9o33k3jhchbw?svg=true)](https://ci.appveyor.com/project/alexcrichton/rand) - -[Documentation](https://doc.rust-lang.org/rand) - -## Usage - -Add this to your `Cargo.toml`: - -```toml -[dependencies] -rand = "0.3" -``` - -and this to your crate root: - -```rust -extern crate rand; -``` - -## Examples - -There is built-in support for a random number generator (RNG) associated with each thread stored in thread-local storage. This RNG can be accessed via thread_rng, or used implicitly via random. This RNG is normally randomly seeded from an operating-system source of randomness, e.g. /dev/urandom on Unix systems, and will automatically reseed itself from this source after generating 32 KiB of random data. - -```rust -let tuple = rand::random::<(f64, char)>(); -println!("{:?}", tuple) -``` - -```rust -use rand::Rng; - -let mut rng = rand::thread_rng(); -if rng.gen() { // random bool - println!("i32: {}, u32: {}", rng.gen::(), rng.gen::()) -} -``` - -It is also possible to use other RNG types, which have a similar interface. The following uses the "ChaCha" algorithm instead of the default. - -```rust -use rand::{Rng, ChaChaRng}; - -let mut rng = rand::ChaChaRng::new_unseeded(); -println!("i32: {}, u32: {}", rng.gen::(), rng.gen::()) -``` - diff --git a/Chapter03/rand/_gitignore b/Chapter03/rand/_gitignore deleted file mode 100644 index a9d37c5..0000000 --- a/Chapter03/rand/_gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target -Cargo.lock diff --git a/Chapter03/rand/_travis.yml b/Chapter03/rand/_travis.yml deleted file mode 100644 index 2c5dbd6..0000000 --- a/Chapter03/rand/_travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: rust -rust: - - 1.0.0 - - stable - - beta - - nightly -sudo: false -before_script: - - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH -script: - - cargo build --verbose - - cargo test --verbose - - cargo doc --no-deps -after_success: - - travis-cargo --only nightly doc-upload -env: - global: - secure: "BdDntVHSompN+Qxz5Rz45VI4ZqhD72r6aPl166FADlnkIwS6N6FLWdqs51O7G5CpoMXEDvyYrjmRMZe/GYLIG9cmqmn/wUrWPO+PauGiIuG/D2dmfuUNvSTRcIe7UQLXrfP3yyfZPgqsH6pSnNEVopquQKy3KjzqepgriOJtbyY=" - - - -notifications: - email: - on_success: never diff --git a/Chapter03/rand/appveyor.yml b/Chapter03/rand/appveyor.yml deleted file mode 100644 index 4a61042..0000000 --- a/Chapter03/rand/appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc - - TARGET: i686-pc-windows-gnu -install: - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - SET PATH=%PATH%;C:\MinGW\bin - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo test --verbose --target %TARGET% diff --git a/Chapter03/rand/benches/bench.rs b/Chapter03/rand/benches/bench.rs deleted file mode 100644 index 5fa92bd..0000000 --- a/Chapter03/rand/benches/bench.rs +++ /dev/null @@ -1,97 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate rand; - -const RAND_BENCH_N: u64 = 1000; - -mod distributions; - -use std::mem::size_of; -use test::{black_box, Bencher}; -use rand::{XorShiftRng, StdRng, IsaacRng, Isaac64Rng, Rng}; -use rand::{OsRng, sample, weak_rng}; - -#[bench] -fn rand_xorshift(b: &mut Bencher) { - let mut rng: XorShiftRng = OsRng::new().unwrap().gen(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.gen::()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_isaac(b: &mut Bencher) { - let mut rng: IsaacRng = OsRng::new().unwrap().gen(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.gen::()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_isaac64(b: &mut Bencher) { - let mut rng: Isaac64Rng = OsRng::new().unwrap().gen(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.gen::()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_std(b: &mut Bencher) { - let mut rng = StdRng::new().unwrap(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.gen::()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_f32(b: &mut Bencher) { - let mut rng = StdRng::new().unwrap(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.next_f32()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_f64(b: &mut Bencher) { - let mut rng = StdRng::new().unwrap(); - b.iter(|| { - for _ in 0..RAND_BENCH_N { - black_box(rng.next_f64()); - } - }); - b.bytes = size_of::() as u64 * RAND_BENCH_N; -} - -#[bench] -fn rand_shuffle_100(b: &mut Bencher) { - let mut rng = weak_rng(); - let x : &mut [usize] = &mut [1; 100]; - b.iter(|| { - rng.shuffle(x); - }) -} - -#[bench] -fn rand_sample_10_of_100(b: &mut Bencher) { - let mut rng = weak_rng(); - let x : &[usize] = &[1; 100]; - b.iter(|| { - sample(&mut rng, x, 10); - }) -} diff --git a/Chapter03/rand/benches/distributions/exponential.rs b/Chapter03/rand/benches/distributions/exponential.rs deleted file mode 100644 index 152615d..0000000 --- a/Chapter03/rand/benches/distributions/exponential.rs +++ /dev/null @@ -1,18 +0,0 @@ -use std::mem::size_of; -use test::Bencher; -use rand; -use rand::distributions::exponential::Exp; -use rand::distributions::Sample; - -#[bench] -fn rand_exp(b: &mut Bencher) { - let mut rng = rand::weak_rng(); - let mut exp = Exp::new(2.71828 * 3.14159); - - b.iter(|| { - for _ in 0..::RAND_BENCH_N { - exp.sample(&mut rng); - } - }); - b.bytes = size_of::() as u64 * ::RAND_BENCH_N; -} diff --git a/Chapter03/rand/benches/distributions/gamma.rs b/Chapter03/rand/benches/distributions/gamma.rs deleted file mode 100644 index bf3fd36..0000000 --- a/Chapter03/rand/benches/distributions/gamma.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::mem::size_of; -use test::Bencher; -use rand; -use rand::distributions::IndependentSample; -use rand::distributions::gamma::Gamma; - -#[bench] -fn bench_gamma_large_shape(b: &mut Bencher) { - let gamma = Gamma::new(10., 1.0); - let mut rng = rand::weak_rng(); - - b.iter(|| { - for _ in 0..::RAND_BENCH_N { - gamma.ind_sample(&mut rng); - } - }); - b.bytes = size_of::() as u64 * ::RAND_BENCH_N; -} - -#[bench] -fn bench_gamma_small_shape(b: &mut Bencher) { - let gamma = Gamma::new(0.1, 1.0); - let mut rng = rand::weak_rng(); - - b.iter(|| { - for _ in 0..::RAND_BENCH_N { - gamma.ind_sample(&mut rng); - } - }); - b.bytes = size_of::() as u64 * ::RAND_BENCH_N; -} diff --git a/Chapter03/rand/benches/distributions/mod.rs b/Chapter03/rand/benches/distributions/mod.rs deleted file mode 100644 index 49f6bd9..0000000 --- a/Chapter03/rand/benches/distributions/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -mod exponential; -mod normal; -mod gamma; diff --git a/Chapter03/rand/benches/distributions/normal.rs b/Chapter03/rand/benches/distributions/normal.rs deleted file mode 100644 index 1c858b1..0000000 --- a/Chapter03/rand/benches/distributions/normal.rs +++ /dev/null @@ -1,18 +0,0 @@ -use std::mem::size_of; -use test::Bencher; -use rand; -use rand::distributions::Sample; -use rand::distributions::normal::Normal; - -#[bench] -fn rand_normal(b: &mut Bencher) { - let mut rng = rand::weak_rng(); - let mut normal = Normal::new(-2.71828, 3.14159); - - b.iter(|| { - for _ in 0..::RAND_BENCH_N { - normal.sample(&mut rng); - } - }); - b.bytes = size_of::() as u64 * ::RAND_BENCH_N; -} diff --git a/Chapter03/rand/rand_macros/Cargo.toml b/Chapter03/rand/rand_macros/Cargo.toml deleted file mode 100644 index 143bfb3..0000000 --- a/Chapter03/rand/rand_macros/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] - -name = "rand_macros" -version = "0.1.10" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/rand" -documentation = "http://doc.rust-lang.org/rand" -homepage = "https://github.com/rust-lang/rand" -description = """ -`#[derive]`-like functionality for the `rand::Rand` trait. -""" - -[lib] -name = "rand_macros" -plugin = true - -[dev-dependencies] -rand = { path = "..", version = "0.3" } diff --git a/Chapter03/rand/rand_macros/README.md b/Chapter03/rand/rand_macros/README.md deleted file mode 100644 index 7e7ea8b..0000000 --- a/Chapter03/rand/rand_macros/README.md +++ /dev/null @@ -1,23 +0,0 @@ -`#[derive]`-like functionality for the `rand::Rand` trait. - -## Example - -```rust -#![feature(plugin)] - -#![plugin(rand_macros)] - -extern crate rand; - -#[derive_Rand] -struct Foo { - x: u8, - y: isize -} - -#[derive_Rand] -enum Bar { - X(char), - Y(f64) -} -``` diff --git a/Chapter03/rand/rand_macros/src/lib.rs b/Chapter03/rand/rand_macros/src/lib.rs deleted file mode 100644 index 9bf9b0e..0000000 --- a/Chapter03/rand/rand_macros/src/lib.rs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(rustc_private, plugin_registrar)] - -extern crate syntax; -extern crate syntax_ext; -extern crate rustc_plugin; - -use syntax::ast::{MetaItem, Expr}; -use syntax::ast; -use syntax::codemap::Span; -use syntax::ext::base; -use syntax::ext::base::{ExtCtxt, Annotatable}; -use syntax::ext::build::AstBuilder; -use syntax_ext::deriving::generic::*; -use syntax_ext::deriving::generic::ty::*; -use syntax::parse::token; -use syntax::ptr::P; -use rustc_plugin::Registry; - -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { - reg.register_syntax_extension(token::intern("derive_Rand"), - base::MultiDecorator(Box::new(expand_deriving_rand))); -} - - - - -pub fn expand_deriving_rand(cx: &mut ExtCtxt, - span: Span, - mitem: &MetaItem, - item: &Annotatable, - push: &mut FnMut(Annotatable)) { - let trait_def = TraitDef { - span: span, - attributes: Vec::new(), - path: Path::new(vec!("rand", "Rand")), - additional_bounds: Vec::new(), - generics: LifetimeBounds::empty(), - is_unsafe: false, - methods: vec!( - MethodDef { - name: "rand", - is_unsafe: false, - generics: LifetimeBounds { - lifetimes: Vec::new(), - bounds: vec!(("R", - vec!( Path::new(vec!("rand", "Rng")) ))) - }, - explicit_self: None, - args: vec!( - Ptr(Box::new(Literal(Path::new_local("R"))), - Borrowed(None, ast::MutMutable)) - ), - ret_ty: Self_, - attributes: Vec::new(), - combine_substructure: combine_substructure(Box::new(|a, b, c| { - rand_substructure(a, b, c) - })) - } - ), - associated_types: Vec::new(), - }; - trait_def.expand(cx, mitem, &item, &mut |i| push(i)) -} - -fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> P { - let rng = if substr.nonself_args.len() == 1 { - &substr.nonself_args[0] - } else { - cx.bug("Incorrect number of arguments to `rand` in `derive(Rand)`") - }; - let rand_ident = vec!( - cx.ident_of("rand"), - cx.ident_of("Rand"), - cx.ident_of("rand") - ); - let rand_call = |cx: &mut ExtCtxt, span| { - cx.expr_call_global(span, - rand_ident.clone(), - vec!(rng.clone())) - }; - - return match *substr.fields { - StaticStruct(_, ref summary) => { - let path = cx.path_ident(trait_span, substr.type_ident); - rand_thing(cx, trait_span, path, summary, rand_call) - } - StaticEnum(_, ref variants) => { - if variants.is_empty() { - cx.span_err(trait_span, "`Rand` cannot be derived for enums with no variants"); - // let compilation continue - return cx.expr_usize(trait_span, 0); - } - - let variant_count = cx.expr_usize(trait_span, variants.len()); - - let rand_name = cx.path_all(trait_span, - true, - rand_ident.clone(), - Vec::new(), - Vec::new(), - Vec::new()); - let rand_name = cx.expr_path(rand_name); - - // ::rand::Rand::rand(rng) - let rv_call = cx.expr_call(trait_span, - rand_name, - vec!(rng.clone())); - - // need to specify the usize-ness of the random number - let usize_ty = cx.ty_ident(trait_span, cx.ident_of("usize")); - let value_ident = cx.ident_of("__value"); - let let_statement = cx.stmt_let_typed(trait_span, - false, - value_ident, - usize_ty, - rv_call); - - // rand() % variants.len() - let value_ref = cx.expr_ident(trait_span, value_ident); - let rand_variant = cx.expr_binary(trait_span, - ast::BiRem, - value_ref, - variant_count); - - let mut arms = variants.iter().enumerate().map(|(i, &(ident, v_span, ref summary))| { - let i_expr = cx.expr_usize(v_span, i); - let pat = cx.pat_lit(v_span, i_expr); - - let path = cx.path(v_span, vec![substr.type_ident, ident]); - let thing = rand_thing(cx, v_span, path, summary, |cx, sp| rand_call(cx, sp)); - cx.arm(v_span, vec!( pat ), thing) - }).collect:: >(); - - // _ => {} at the end. Should never occur - arms.push(cx.arm_unreachable(trait_span)); - - let match_expr = cx.expr_match(trait_span, rand_variant, arms); - - let block = cx.block(trait_span, vec!( let_statement ), Some(match_expr)); - cx.expr_block(block) - } - _ => cx.bug("Non-static method in `derive(Rand)`") - }; - - fn rand_thing(cx: &mut ExtCtxt, - trait_span: Span, - ctor_path: ast::Path, - summary: &StaticFields, - mut rand_call: F) - -> P where - F: FnMut(&mut ExtCtxt, Span) -> P, - { - let path = cx.expr_path(ctor_path.clone()); - match *summary { - Unnamed(ref fields) => { - if fields.is_empty() { - path - } else { - let exprs = fields.iter().map(|span| rand_call(cx, *span)).collect(); - cx.expr_call(trait_span, path, exprs) - } - } - Named(ref fields) => { - let rand_fields = fields.iter().map(|&(ident, span)| { - let e = rand_call(cx, span); - cx.field_imm(span, ident, e) - }).collect(); - cx.expr_struct(trait_span, ctor_path, rand_fields) - } - } - } -} diff --git a/Chapter03/rand/rand_macros/tests/rand_macros.rs b/Chapter03/rand/rand_macros/tests/rand_macros.rs deleted file mode 100644 index 8cd3c8b..0000000 --- a/Chapter03/rand/rand_macros/tests/rand_macros.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![allow(dead_code)] -#![feature(plugin, custom_derive)] -#![plugin(rand_macros)] - -extern crate rand; - -use rand::Rng; - -#[derive_Rand] -struct Foo { - x: u8, - y: isize -} - -#[derive_Rand] -enum Bar { - X(char), - Y(f64) -} - -#[test] -fn smoke() { - let mut rng = rand::XorShiftRng::new_unseeded(); - - // check nothing horrible happens internally: - for _ in 0..100 { - let _: Foo = rng.gen(); - let _: Bar = rng.gen(); - } -} diff --git a/Chapter03/rand/src/chacha.rs b/Chapter03/rand/src/chacha.rs deleted file mode 100644 index 1acec5e..0000000 --- a/Chapter03/rand/src/chacha.rs +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The ChaCha random number generator. - -use std::num::Wrapping as w; -use {Rng, SeedableRng, Rand, w32}; - -const KEY_WORDS : usize = 8; // 8 words for the 256-bit key -const STATE_WORDS : usize = 16; -const CHACHA_ROUNDS: u32 = 20; // Cryptographically secure from 8 upwards as of this writing - -/// A random number generator that uses the ChaCha20 algorithm [1]. -/// -/// The ChaCha algorithm is widely accepted as suitable for -/// cryptographic purposes, but this implementation has not been -/// verified as such. Prefer a generator like `OsRng` that defers to -/// the operating system for cases that need high security. -/// -/// [1]: D. J. Bernstein, [*ChaCha, a variant of -/// Salsa20*](http://cr.yp.to/chacha.html) -#[derive(Copy, Clone, Debug)] -pub struct ChaChaRng { - buffer: [w32; STATE_WORDS], // Internal buffer of output - state: [w32; STATE_WORDS], // Initial state - index: usize, // Index into state -} - -static EMPTY: ChaChaRng = ChaChaRng { - buffer: [w(0); STATE_WORDS], - state: [w(0); STATE_WORDS], - index: STATE_WORDS -}; - - -macro_rules! quarter_round{ - ($a: expr, $b: expr, $c: expr, $d: expr) => {{ - $a = $a + $b; $d = $d ^ $a; $d = w($d.0.rotate_left(16)); - $c = $c + $d; $b = $b ^ $c; $b = w($b.0.rotate_left(12)); - $a = $a + $b; $d = $d ^ $a; $d = w($d.0.rotate_left( 8)); - $c = $c + $d; $b = $b ^ $c; $b = w($b.0.rotate_left( 7)); - }} -} - -macro_rules! double_round{ - ($x: expr) => {{ - // Column round - quarter_round!($x[ 0], $x[ 4], $x[ 8], $x[12]); - quarter_round!($x[ 1], $x[ 5], $x[ 9], $x[13]); - quarter_round!($x[ 2], $x[ 6], $x[10], $x[14]); - quarter_round!($x[ 3], $x[ 7], $x[11], $x[15]); - // Diagonal round - quarter_round!($x[ 0], $x[ 5], $x[10], $x[15]); - quarter_round!($x[ 1], $x[ 6], $x[11], $x[12]); - quarter_round!($x[ 2], $x[ 7], $x[ 8], $x[13]); - quarter_round!($x[ 3], $x[ 4], $x[ 9], $x[14]); - }} -} - -#[inline] -fn core(output: &mut [w32; STATE_WORDS], input: &[w32; STATE_WORDS]) { - *output = *input; - - for _ in 0..CHACHA_ROUNDS / 2 { - double_round!(output); - } - - for i in 0..STATE_WORDS { - output[i] = output[i] + input[i]; - } -} - -impl ChaChaRng { - - /// Create an ChaCha random number generator using the default - /// fixed key of 8 zero words. - /// - /// # Examples - /// - /// ```rust - /// use rand::{Rng, ChaChaRng}; - /// - /// let mut ra = ChaChaRng::new_unseeded(); - /// println!("{:?}", ra.next_u32()); - /// println!("{:?}", ra.next_u32()); - /// ``` - /// - /// Since this equivalent to a RNG with a fixed seed, repeated executions - /// of an unseeded RNG will produce the same result. This code sample will - /// consistently produce: - /// - /// - 2917185654 - /// - 2419978656 - pub fn new_unseeded() -> ChaChaRng { - let mut rng = EMPTY; - rng.init(&[0; KEY_WORDS]); - rng - } - - /// Sets the internal 128-bit ChaCha counter to - /// a user-provided value. This permits jumping - /// arbitrarily ahead (or backwards) in the pseudorandom stream. - /// - /// Since the nonce words are used to extend the counter to 128 bits, - /// users wishing to obtain the conventional ChaCha pseudorandom stream - /// associated with a particular nonce can call this function with - /// arguments `0, desired_nonce`. - /// - /// # Examples - /// - /// ```rust - /// use rand::{Rng, ChaChaRng}; - /// - /// let mut ra = ChaChaRng::new_unseeded(); - /// ra.set_counter(0u64, 1234567890u64); - /// println!("{:?}", ra.next_u32()); - /// println!("{:?}", ra.next_u32()); - /// ``` - pub fn set_counter(&mut self, counter_low: u64, counter_high: u64) { - self.state[12] = w((counter_low >> 0) as u32); - self.state[13] = w((counter_low >> 32) as u32); - self.state[14] = w((counter_high >> 0) as u32); - self.state[15] = w((counter_high >> 32) as u32); - self.index = STATE_WORDS; // force recomputation - } - - /// Initializes `self.state` with the appropriate key and constants - /// - /// We deviate slightly from the ChaCha specification regarding - /// the nonce, which is used to extend the counter to 128 bits. - /// This is provably as strong as the original cipher, though, - /// since any distinguishing attack on our variant also works - /// against ChaCha with a chosen-nonce. See the XSalsa20 [1] - /// security proof for a more involved example of this. - /// - /// The modified word layout is: - /// ```text - /// constant constant constant constant - /// key key key key - /// key key key key - /// counter counter counter counter - /// ``` - /// [1]: Daniel J. Bernstein. [*Extending the Salsa20 - /// nonce.*](http://cr.yp.to/papers.html#xsalsa) - fn init(&mut self, key: &[u32; KEY_WORDS]) { - self.state[0] = w(0x61707865); - self.state[1] = w(0x3320646E); - self.state[2] = w(0x79622D32); - self.state[3] = w(0x6B206574); - - for i in 0..KEY_WORDS { - self.state[4+i] = w(key[i]); - } - - self.state[12] = w(0); - self.state[13] = w(0); - self.state[14] = w(0); - self.state[15] = w(0); - - self.index = STATE_WORDS; - } - - /// Refill the internal output buffer (`self.buffer`) - fn update(&mut self) { - core(&mut self.buffer, &self.state); - self.index = 0; - // update 128-bit counter - self.state[12] = self.state[12] + w(1); - if self.state[12] != w(0) { return }; - self.state[13] = self.state[13] + w(1); - if self.state[13] != w(0) { return }; - self.state[14] = self.state[14] + w(1); - if self.state[14] != w(0) { return }; - self.state[15] = self.state[15] + w(1); - } -} - -impl Rng for ChaChaRng { - #[inline] - fn next_u32(&mut self) -> u32 { - if self.index == STATE_WORDS { - self.update(); - } - - let value = self.buffer[self.index % STATE_WORDS]; - self.index += 1; - value.0 - } -} - -impl<'a> SeedableRng<&'a [u32]> for ChaChaRng { - - fn reseed(&mut self, seed: &'a [u32]) { - // reset state - self.init(&[0u32; KEY_WORDS]); - // set key in place - let key = &mut self.state[4 .. 4+KEY_WORDS]; - for (k, s) in key.iter_mut().zip(seed.iter()) { - *k = w(*s); - } - } - - /// Create a ChaCha generator from a seed, - /// obtained from a variable-length u32 array. - /// Only up to 8 words are used; if less than 8 - /// words are used, the remaining are set to zero. - fn from_seed(seed: &'a [u32]) -> ChaChaRng { - let mut rng = EMPTY; - rng.reseed(seed); - rng - } -} - -impl Rand for ChaChaRng { - fn rand(other: &mut R) -> ChaChaRng { - let mut key : [u32; KEY_WORDS] = [0; KEY_WORDS]; - for word in key.iter_mut() { - *word = other.gen(); - } - SeedableRng::from_seed(&key[..]) - } -} - - -#[cfg(test)] -mod test { - use {Rng, SeedableRng}; - use super::ChaChaRng; - - #[test] - fn test_rng_rand_seeded() { - let s = ::test::rng().gen_iter::().take(8).collect::>(); - let mut ra: ChaChaRng = SeedableRng::from_seed(&s[..]); - let mut rb: ChaChaRng = SeedableRng::from_seed(&s[..]); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_rng_seeded() { - let seed : &[_] = &[0,1,2,3,4,5,6,7]; - let mut ra: ChaChaRng = SeedableRng::from_seed(seed); - let mut rb: ChaChaRng = SeedableRng::from_seed(seed); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_rng_reseed() { - let s = ::test::rng().gen_iter::().take(8).collect::>(); - let mut r: ChaChaRng = SeedableRng::from_seed(&s[..]); - let string1: String = r.gen_ascii_chars().take(100).collect(); - - r.reseed(&s); - - let string2: String = r.gen_ascii_chars().take(100).collect(); - assert_eq!(string1, string2); - } - - #[test] - fn test_rng_true_values() { - // Test vectors 1 and 2 from - // http://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305-04 - let seed : &[_] = &[0u32; 8]; - let mut ra: ChaChaRng = SeedableRng::from_seed(seed); - - let v = (0..16).map(|_| ra.next_u32()).collect::>(); - assert_eq!(v, - vec!(0xade0b876, 0x903df1a0, 0xe56a5d40, 0x28bd8653, - 0xb819d2bd, 0x1aed8da0, 0xccef36a8, 0xc70d778b, - 0x7c5941da, 0x8d485751, 0x3fe02477, 0x374ad8b8, - 0xf4b8436a, 0x1ca11815, 0x69b687c3, 0x8665eeb2)); - - let v = (0..16).map(|_| ra.next_u32()).collect::>(); - assert_eq!(v, - vec!(0xbee7079f, 0x7a385155, 0x7c97ba98, 0x0d082d73, - 0xa0290fcb, 0x6965e348, 0x3e53c612, 0xed7aee32, - 0x7621b729, 0x434ee69c, 0xb03371d5, 0xd539d874, - 0x281fed31, 0x45fb0a51, 0x1f0ae1ac, 0x6f4d794b)); - - - let seed : &[_] = &[0,1,2,3,4,5,6,7]; - let mut ra: ChaChaRng = SeedableRng::from_seed(seed); - - // Store the 17*i-th 32-bit word, - // i.e., the i-th word of the i-th 16-word block - let mut v : Vec = Vec::new(); - for _ in 0..16 { - v.push(ra.next_u32()); - for _ in 0..16 { - ra.next_u32(); - } - } - - assert_eq!(v, - vec!(0xf225c81a, 0x6ab1be57, 0x04d42951, 0x70858036, - 0x49884684, 0x64efec72, 0x4be2d186, 0x3615b384, - 0x11cfa18e, 0xd3c50049, 0x75c775f6, 0x434c6530, - 0x2c5bad8f, 0x898881dc, 0x5f1c86d9, 0xc1f8e7f4)); - } - - #[test] - fn test_rng_clone() { - let seed : &[_] = &[0u32; 8]; - let mut rng: ChaChaRng = SeedableRng::from_seed(seed); - let mut clone = rng.clone(); - for _ in 0..16 { - assert_eq!(rng.next_u64(), clone.next_u64()); - } - } -} diff --git a/Chapter03/rand/src/distributions/exponential.rs b/Chapter03/rand/src/distributions/exponential.rs deleted file mode 100644 index 1be1f8d..0000000 --- a/Chapter03/rand/src/distributions/exponential.rs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The exponential distribution. - -use {Rng, Rand}; -use distributions::{ziggurat, ziggurat_tables, Sample, IndependentSample}; - -/// A wrapper around an `f64` to generate Exp(1) random numbers. -/// -/// See `Exp` for the general exponential distribution. -/// -/// Implemented via the ZIGNOR variant[1] of the Ziggurat method. The -/// exact description in the paper was adjusted to use tables for the -/// exponential distribution rather than normal. -/// -/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to -/// Generate Normal Random -/// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield -/// College, Oxford -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::exponential::Exp1; -/// -/// let Exp1(x) = rand::random(); -/// println!("{}", x); -/// ``` -#[derive(Clone, Copy)] -pub struct Exp1(pub f64); - -// This could be done via `-rng.gen::().ln()` but that is slower. -impl Rand for Exp1 { - #[inline] - fn rand(rng: &mut R) -> Exp1 { - #[inline] - fn pdf(x: f64) -> f64 { - (-x).exp() - } - #[inline] - fn zero_case(rng: &mut R, _u: f64) -> f64 { - ziggurat_tables::ZIG_EXP_R - rng.gen::().ln() - } - - Exp1(ziggurat(rng, false, - &ziggurat_tables::ZIG_EXP_X, - &ziggurat_tables::ZIG_EXP_F, - pdf, zero_case)) - } -} - -/// The exponential distribution `Exp(lambda)`. -/// -/// This distribution has density function: `f(x) = lambda * -/// exp(-lambda * x)` for `x > 0`. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{Exp, IndependentSample}; -/// -/// let exp = Exp::new(2.0); -/// let v = exp.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from a Exp(2) distribution", v); -/// ``` -#[derive(Clone, Copy)] -pub struct Exp { - /// `lambda` stored as `1/lambda`, since this is what we scale by. - lambda_inverse: f64 -} - -impl Exp { - /// Construct a new `Exp` with the given shape parameter - /// `lambda`. Panics if `lambda <= 0`. - #[inline] - pub fn new(lambda: f64) -> Exp { - assert!(lambda > 0.0, "Exp::new called with `lambda` <= 0"); - Exp { lambda_inverse: 1.0 / lambda } - } -} - -impl Sample for Exp { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for Exp { - fn ind_sample(&self, rng: &mut R) -> f64 { - let Exp1(n) = rng.gen::(); - n * self.lambda_inverse - } -} - -#[cfg(test)] -mod test { - use distributions::{Sample, IndependentSample}; - use super::Exp; - - #[test] - fn test_exp() { - let mut exp = Exp::new(10.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - assert!(exp.sample(&mut rng) >= 0.0); - assert!(exp.ind_sample(&mut rng) >= 0.0); - } - } - #[test] - #[should_panic] - fn test_exp_invalid_lambda_zero() { - Exp::new(0.0); - } - #[test] - #[should_panic] - fn test_exp_invalid_lambda_neg() { - Exp::new(-10.0); - } -} diff --git a/Chapter03/rand/src/distributions/gamma.rs b/Chapter03/rand/src/distributions/gamma.rs deleted file mode 100644 index 7ecbc03..0000000 --- a/Chapter03/rand/src/distributions/gamma.rs +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -// -// ignore-lexer-test FIXME #15679 - -//! The Gamma and derived distributions. - -use self::GammaRepr::*; -use self::ChiSquaredRepr::*; - -use {Rng, Open01}; -use super::normal::StandardNormal; -use super::{IndependentSample, Sample, Exp}; - -/// The Gamma distribution `Gamma(shape, scale)` distribution. -/// -/// The density function of this distribution is -/// -/// ```text -/// f(x) = x^(k - 1) * exp(-x / θ) / (Γ(k) * θ^k) -/// ``` -/// -/// where `Γ` is the Gamma function, `k` is the shape and `θ` is the -/// scale and both `k` and `θ` are strictly positive. -/// -/// The algorithm used is that described by Marsaglia & Tsang 2000[1], -/// falling back to directly sampling from an Exponential for `shape -/// == 1`, and using the boosting technique described in [1] for -/// `shape < 1`. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{IndependentSample, Gamma}; -/// -/// let gamma = Gamma::new(2.0, 5.0); -/// let v = gamma.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from a Gamma(2, 5) distribution", v); -/// ``` -/// -/// [1]: George Marsaglia and Wai Wan Tsang. 2000. "A Simple Method -/// for Generating Gamma Variables" *ACM Trans. Math. Softw.* 26, 3 -/// (September 2000), -/// 363-372. DOI:[10.1145/358407.358414](http://doi.acm.org/10.1145/358407.358414) -#[derive(Clone, Copy)] -pub struct Gamma { - repr: GammaRepr, -} - -#[derive(Clone, Copy)] -enum GammaRepr { - Large(GammaLargeShape), - One(Exp), - Small(GammaSmallShape) -} - -// These two helpers could be made public, but saving the -// match-on-Gamma-enum branch from using them directly (e.g. if one -// knows that the shape is always > 1) doesn't appear to be much -// faster. - -/// Gamma distribution where the shape parameter is less than 1. -/// -/// Note, samples from this require a compulsory floating-point `pow` -/// call, which makes it significantly slower than sampling from a -/// gamma distribution where the shape parameter is greater than or -/// equal to 1. -/// -/// See `Gamma` for sampling from a Gamma distribution with general -/// shape parameters. -#[derive(Clone, Copy)] -struct GammaSmallShape { - inv_shape: f64, - large_shape: GammaLargeShape -} - -/// Gamma distribution where the shape parameter is larger than 1. -/// -/// See `Gamma` for sampling from a Gamma distribution with general -/// shape parameters. -#[derive(Clone, Copy)] -struct GammaLargeShape { - scale: f64, - c: f64, - d: f64 -} - -impl Gamma { - /// Construct an object representing the `Gamma(shape, scale)` - /// distribution. - /// - /// Panics if `shape <= 0` or `scale <= 0`. - #[inline] - pub fn new(shape: f64, scale: f64) -> Gamma { - assert!(shape > 0.0, "Gamma::new called with shape <= 0"); - assert!(scale > 0.0, "Gamma::new called with scale <= 0"); - - let repr = match shape { - 1.0 => One(Exp::new(1.0 / scale)), - 0.0 ... 1.0 => Small(GammaSmallShape::new_raw(shape, scale)), - _ => Large(GammaLargeShape::new_raw(shape, scale)) - }; - Gamma { repr: repr } - } -} - -impl GammaSmallShape { - fn new_raw(shape: f64, scale: f64) -> GammaSmallShape { - GammaSmallShape { - inv_shape: 1. / shape, - large_shape: GammaLargeShape::new_raw(shape + 1.0, scale) - } - } -} - -impl GammaLargeShape { - fn new_raw(shape: f64, scale: f64) -> GammaLargeShape { - let d = shape - 1. / 3.; - GammaLargeShape { - scale: scale, - c: 1. / (9. * d).sqrt(), - d: d - } - } -} - -impl Sample for Gamma { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl Sample for GammaSmallShape { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl Sample for GammaLargeShape { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} - -impl IndependentSample for Gamma { - fn ind_sample(&self, rng: &mut R) -> f64 { - match self.repr { - Small(ref g) => g.ind_sample(rng), - One(ref g) => g.ind_sample(rng), - Large(ref g) => g.ind_sample(rng), - } - } -} -impl IndependentSample for GammaSmallShape { - fn ind_sample(&self, rng: &mut R) -> f64 { - let Open01(u) = rng.gen::>(); - - self.large_shape.ind_sample(rng) * u.powf(self.inv_shape) - } -} -impl IndependentSample for GammaLargeShape { - fn ind_sample(&self, rng: &mut R) -> f64 { - loop { - let StandardNormal(x) = rng.gen::(); - let v_cbrt = 1.0 + self.c * x; - if v_cbrt <= 0.0 { // a^3 <= 0 iff a <= 0 - continue - } - - let v = v_cbrt * v_cbrt * v_cbrt; - let Open01(u) = rng.gen::>(); - - let x_sqr = x * x; - if u < 1.0 - 0.0331 * x_sqr * x_sqr || - u.ln() < 0.5 * x_sqr + self.d * (1.0 - v + v.ln()) { - return self.d * v * self.scale - } - } - } -} - -/// The chi-squared distribution `χ²(k)`, where `k` is the degrees of -/// freedom. -/// -/// For `k > 0` integral, this distribution is the sum of the squares -/// of `k` independent standard normal random variables. For other -/// `k`, this uses the equivalent characterisation `χ²(k) = Gamma(k/2, -/// 2)`. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{ChiSquared, IndependentSample}; -/// -/// let chi = ChiSquared::new(11.0); -/// let v = chi.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from a χ²(11) distribution", v) -/// ``` -#[derive(Clone, Copy)] -pub struct ChiSquared { - repr: ChiSquaredRepr, -} - -#[derive(Clone, Copy)] -enum ChiSquaredRepr { - // k == 1, Gamma(alpha, ..) is particularly slow for alpha < 1, - // e.g. when alpha = 1/2 as it would be for this case, so special- - // casing and using the definition of N(0,1)^2 is faster. - DoFExactlyOne, - DoFAnythingElse(Gamma), -} - -impl ChiSquared { - /// Create a new chi-squared distribution with degrees-of-freedom - /// `k`. Panics if `k < 0`. - pub fn new(k: f64) -> ChiSquared { - let repr = if k == 1.0 { - DoFExactlyOne - } else { - assert!(k > 0.0, "ChiSquared::new called with `k` < 0"); - DoFAnythingElse(Gamma::new(0.5 * k, 2.0)) - }; - ChiSquared { repr: repr } - } -} -impl Sample for ChiSquared { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for ChiSquared { - fn ind_sample(&self, rng: &mut R) -> f64 { - match self.repr { - DoFExactlyOne => { - // k == 1 => N(0,1)^2 - let StandardNormal(norm) = rng.gen::(); - norm * norm - } - DoFAnythingElse(ref g) => g.ind_sample(rng) - } - } -} - -/// The Fisher F distribution `F(m, n)`. -/// -/// This distribution is equivalent to the ratio of two normalised -/// chi-squared distributions, that is, `F(m,n) = (χ²(m)/m) / -/// (χ²(n)/n)`. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{FisherF, IndependentSample}; -/// -/// let f = FisherF::new(2.0, 32.0); -/// let v = f.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from an F(2, 32) distribution", v) -/// ``` -#[derive(Clone, Copy)] -pub struct FisherF { - numer: ChiSquared, - denom: ChiSquared, - // denom_dof / numer_dof so that this can just be a straight - // multiplication, rather than a division. - dof_ratio: f64, -} - -impl FisherF { - /// Create a new `FisherF` distribution, with the given - /// parameter. Panics if either `m` or `n` are not positive. - pub fn new(m: f64, n: f64) -> FisherF { - assert!(m > 0.0, "FisherF::new called with `m < 0`"); - assert!(n > 0.0, "FisherF::new called with `n < 0`"); - - FisherF { - numer: ChiSquared::new(m), - denom: ChiSquared::new(n), - dof_ratio: n / m - } - } -} -impl Sample for FisherF { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for FisherF { - fn ind_sample(&self, rng: &mut R) -> f64 { - self.numer.ind_sample(rng) / self.denom.ind_sample(rng) * self.dof_ratio - } -} - -/// The Student t distribution, `t(nu)`, where `nu` is the degrees of -/// freedom. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{StudentT, IndependentSample}; -/// -/// let t = StudentT::new(11.0); -/// let v = t.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from a t(11) distribution", v) -/// ``` -#[derive(Clone, Copy)] -pub struct StudentT { - chi: ChiSquared, - dof: f64 -} - -impl StudentT { - /// Create a new Student t distribution with `n` degrees of - /// freedom. Panics if `n <= 0`. - pub fn new(n: f64) -> StudentT { - assert!(n > 0.0, "StudentT::new called with `n <= 0`"); - StudentT { - chi: ChiSquared::new(n), - dof: n - } - } -} -impl Sample for StudentT { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for StudentT { - fn ind_sample(&self, rng: &mut R) -> f64 { - let StandardNormal(norm) = rng.gen::(); - norm * (self.dof / self.chi.ind_sample(rng)).sqrt() - } -} - -#[cfg(test)] -mod test { - use distributions::{Sample, IndependentSample}; - use super::{ChiSquared, StudentT, FisherF}; - - #[test] - fn test_chi_squared_one() { - let mut chi = ChiSquared::new(1.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - chi.sample(&mut rng); - chi.ind_sample(&mut rng); - } - } - #[test] - fn test_chi_squared_small() { - let mut chi = ChiSquared::new(0.5); - let mut rng = ::test::rng(); - for _ in 0..1000 { - chi.sample(&mut rng); - chi.ind_sample(&mut rng); - } - } - #[test] - fn test_chi_squared_large() { - let mut chi = ChiSquared::new(30.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - chi.sample(&mut rng); - chi.ind_sample(&mut rng); - } - } - #[test] - #[should_panic] - fn test_chi_squared_invalid_dof() { - ChiSquared::new(-1.0); - } - - #[test] - fn test_f() { - let mut f = FisherF::new(2.0, 32.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - f.sample(&mut rng); - f.ind_sample(&mut rng); - } - } - - #[test] - fn test_t() { - let mut t = StudentT::new(11.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - t.sample(&mut rng); - t.ind_sample(&mut rng); - } - } -} diff --git a/Chapter03/rand/src/distributions/mod.rs b/Chapter03/rand/src/distributions/mod.rs deleted file mode 100644 index 8a9e6d2..0000000 --- a/Chapter03/rand/src/distributions/mod.rs +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Sampling from random distributions. -//! -//! This is a generalization of `Rand` to allow parameters to control the -//! exact properties of the generated values, e.g. the mean and standard -//! deviation of a normal distribution. The `Sample` trait is the most -//! general, and allows for generating values that change some state -//! internally. The `IndependentSample` trait is for generating values -//! that do not need to record state. - -#![allow(missing_debug_implementations)] - -use std::marker; - -use {Rng, Rand}; - -pub use self::range::Range; -pub use self::gamma::{Gamma, ChiSquared, FisherF, StudentT}; -pub use self::normal::{Normal, LogNormal}; -pub use self::exponential::Exp; - -pub mod range; -pub mod gamma; -pub mod normal; -pub mod exponential; - -/// Types that can be used to create a random instance of `Support`. -pub trait Sample { - /// Generate a random value of `Support`, using `rng` as the - /// source of randomness. - fn sample(&mut self, rng: &mut R) -> Support; -} - -/// `Sample`s that do not require keeping track of state. -/// -/// Since no state is recorded, each sample is (statistically) -/// independent of all others, assuming the `Rng` used has this -/// property. -// FIXME maybe having this separate is overkill (the only reason is to -// take &self rather than &mut self)? or maybe this should be the -// trait called `Sample` and the other should be `DependentSample`. -pub trait IndependentSample: Sample { - /// Generate a random value. - fn ind_sample(&self, &mut R) -> Support; -} - -/// A wrapper for generating types that implement `Rand` via the -/// `Sample` & `IndependentSample` traits. -pub struct RandSample { - _marker: marker::PhantomData Sup>, -} - -impl Copy for RandSample {} -impl Clone for RandSample { - fn clone(&self) -> Self { *self } -} - -impl Sample for RandSample { - fn sample(&mut self, rng: &mut R) -> Sup { self.ind_sample(rng) } -} - -impl IndependentSample for RandSample { - fn ind_sample(&self, rng: &mut R) -> Sup { - rng.gen() - } -} - -impl RandSample { - pub fn new() -> RandSample { - RandSample { _marker: marker::PhantomData } - } -} - -/// A value with a particular weight for use with `WeightedChoice`. -#[derive(Copy)] -#[derive(Clone)] -pub struct Weighted { - /// The numerical weight of this item - pub weight: u32, - /// The actual item which is being weighted - pub item: T, -} - -/// A distribution that selects from a finite collection of weighted items. -/// -/// Each item has an associated weight that influences how likely it -/// is to be chosen: higher weight is more likely. -/// -/// The `Clone` restriction is a limitation of the `Sample` and -/// `IndependentSample` traits. Note that `&T` is (cheaply) `Clone` for -/// all `T`, as is `u32`, so one can store references or indices into -/// another vector. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{Weighted, WeightedChoice, IndependentSample}; -/// -/// let mut items = vec!(Weighted { weight: 2, item: 'a' }, -/// Weighted { weight: 4, item: 'b' }, -/// Weighted { weight: 1, item: 'c' }); -/// let wc = WeightedChoice::new(&mut items); -/// let mut rng = rand::thread_rng(); -/// for _ in 0..16 { -/// // on average prints 'a' 4 times, 'b' 8 and 'c' twice. -/// println!("{}", wc.ind_sample(&mut rng)); -/// } -/// ``` -pub struct WeightedChoice<'a, T:'a> { - items: &'a mut [Weighted], - weight_range: Range -} - -impl<'a, T: Clone> WeightedChoice<'a, T> { - /// Create a new `WeightedChoice`. - /// - /// Panics if: - /// - `v` is empty - /// - the total weight is 0 - /// - the total weight is larger than a `u32` can contain. - pub fn new(items: &'a mut [Weighted]) -> WeightedChoice<'a, T> { - // strictly speaking, this is subsumed by the total weight == 0 case - assert!(!items.is_empty(), "WeightedChoice::new called with no items"); - - let mut running_total: u32 = 0; - - // we convert the list from individual weights to cumulative - // weights so we can binary search. This *could* drop elements - // with weight == 0 as an optimisation. - for item in items.iter_mut() { - running_total = match running_total.checked_add(item.weight) { - Some(n) => n, - None => panic!("WeightedChoice::new called with a total weight \ - larger than a u32 can contain") - }; - - item.weight = running_total; - } - assert!(running_total != 0, "WeightedChoice::new called with a total weight of 0"); - - WeightedChoice { - items: items, - // we're likely to be generating numbers in this range - // relatively often, so might as well cache it - weight_range: Range::new(0, running_total) - } - } -} - -impl<'a, T: Clone> Sample for WeightedChoice<'a, T> { - fn sample(&mut self, rng: &mut R) -> T { self.ind_sample(rng) } -} - -impl<'a, T: Clone> IndependentSample for WeightedChoice<'a, T> { - fn ind_sample(&self, rng: &mut R) -> T { - // we want to find the first element that has cumulative - // weight > sample_weight, which we do by binary since the - // cumulative weights of self.items are sorted. - - // choose a weight in [0, total_weight) - let sample_weight = self.weight_range.ind_sample(rng); - - // short circuit when it's the first item - if sample_weight < self.items[0].weight { - return self.items[0].item.clone(); - } - - let mut idx = 0; - let mut modifier = self.items.len(); - - // now we know that every possibility has an element to the - // left, so we can just search for the last element that has - // cumulative weight <= sample_weight, then the next one will - // be "it". (Note that this greatest element will never be the - // last element of the vector, since sample_weight is chosen - // in [0, total_weight) and the cumulative weight of the last - // one is exactly the total weight.) - while modifier > 1 { - let i = idx + modifier / 2; - if self.items[i].weight <= sample_weight { - // we're small, so look to the right, but allow this - // exact element still. - idx = i; - // we need the `/ 2` to round up otherwise we'll drop - // the trailing elements when `modifier` is odd. - modifier += 1; - } else { - // otherwise we're too big, so go left. (i.e. do - // nothing) - } - modifier /= 2; - } - return self.items[idx + 1].item.clone(); - } -} - -mod ziggurat_tables; - -/// Sample a random number using the Ziggurat method (specifically the -/// ZIGNOR variant from Doornik 2005). Most of the arguments are -/// directly from the paper: -/// -/// * `rng`: source of randomness -/// * `symmetric`: whether this is a symmetric distribution, or one-sided with P(x < 0) = 0. -/// * `X`: the $x_i$ abscissae. -/// * `F`: precomputed values of the PDF at the $x_i$, (i.e. $f(x_i)$) -/// * `F_DIFF`: precomputed values of $f(x_i) - f(x_{i+1})$ -/// * `pdf`: the probability density function -/// * `zero_case`: manual sampling from the tail when we chose the -/// bottom box (i.e. i == 0) - -// the perf improvement (25-50%) is definitely worth the extra code -// size from force-inlining. -#[inline(always)] -fn ziggurat( - rng: &mut R, - symmetric: bool, - x_tab: ziggurat_tables::ZigTable, - f_tab: ziggurat_tables::ZigTable, - mut pdf: P, - mut zero_case: Z) - -> f64 where P: FnMut(f64) -> f64, Z: FnMut(&mut R, f64) -> f64 { - const SCALE: f64 = (1u64 << 53) as f64; - loop { - // reimplement the f64 generation as an optimisation suggested - // by the Doornik paper: we have a lot of precision-space - // (i.e. there are 11 bits of the 64 of a u64 to use after - // creating a f64), so we might as well reuse some to save - // generating a whole extra random number. (Seems to be 15% - // faster.) - // - // This unfortunately misses out on the benefits of direct - // floating point generation if an RNG like dSMFT is - // used. (That is, such RNGs create floats directly, highly - // efficiently and overload next_f32/f64, so by not calling it - // this may be slower than it would be otherwise.) - // FIXME: investigate/optimise for the above. - let bits: u64 = rng.gen(); - let i = (bits & 0xff) as usize; - let f = (bits >> 11) as f64 / SCALE; - - // u is either U(-1, 1) or U(0, 1) depending on if this is a - // symmetric distribution or not. - let u = if symmetric {2.0 * f - 1.0} else {f}; - let x = u * x_tab[i]; - - let test_x = if symmetric { x.abs() } else {x}; - - // algebraically equivalent to |u| < x_tab[i+1]/x_tab[i] (or u < x_tab[i+1]/x_tab[i]) - if test_x < x_tab[i + 1] { - return x; - } - if i == 0 { - return zero_case(rng, u); - } - // algebraically equivalent to f1 + DRanU()*(f0 - f1) < 1 - if f_tab[i + 1] + (f_tab[i] - f_tab[i + 1]) * rng.gen::() < pdf(x) { - return x; - } - } -} - -#[cfg(test)] -mod tests { - - use {Rng, Rand}; - use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample}; - - #[derive(PartialEq, Debug)] - struct ConstRand(usize); - impl Rand for ConstRand { - fn rand(_: &mut R) -> ConstRand { - ConstRand(0) - } - } - - // 0, 1, 2, 3, ... - struct CountingRng { i: u32 } - impl Rng for CountingRng { - fn next_u32(&mut self) -> u32 { - self.i += 1; - self.i - 1 - } - fn next_u64(&mut self) -> u64 { - self.next_u32() as u64 - } - } - - #[test] - fn test_rand_sample() { - let mut rand_sample = RandSample::::new(); - - assert_eq!(rand_sample.sample(&mut ::test::rng()), ConstRand(0)); - assert_eq!(rand_sample.ind_sample(&mut ::test::rng()), ConstRand(0)); - } - #[test] - fn test_weighted_choice() { - // this makes assumptions about the internal implementation of - // WeightedChoice, specifically: it doesn't reorder the items, - // it doesn't do weird things to the RNG (so 0 maps to 0, 1 to - // 1, internally; modulo a modulo operation). - - macro_rules! t { - ($items:expr, $expected:expr) => {{ - let mut items = $items; - let wc = WeightedChoice::new(&mut items); - let expected = $expected; - - let mut rng = CountingRng { i: 0 }; - - for &val in expected.iter() { - assert_eq!(wc.ind_sample(&mut rng), val) - } - }} - } - - t!(vec!(Weighted { weight: 1, item: 10}), [10]); - - // skip some - t!(vec!(Weighted { weight: 0, item: 20}, - Weighted { weight: 2, item: 21}, - Weighted { weight: 0, item: 22}, - Weighted { weight: 1, item: 23}), - [21,21, 23]); - - // different weights - t!(vec!(Weighted { weight: 4, item: 30}, - Weighted { weight: 3, item: 31}), - [30,30,30,30, 31,31,31]); - - // check that we're binary searching - // correctly with some vectors of odd - // length. - t!(vec!(Weighted { weight: 1, item: 40}, - Weighted { weight: 1, item: 41}, - Weighted { weight: 1, item: 42}, - Weighted { weight: 1, item: 43}, - Weighted { weight: 1, item: 44}), - [40, 41, 42, 43, 44]); - t!(vec!(Weighted { weight: 1, item: 50}, - Weighted { weight: 1, item: 51}, - Weighted { weight: 1, item: 52}, - Weighted { weight: 1, item: 53}, - Weighted { weight: 1, item: 54}, - Weighted { weight: 1, item: 55}, - Weighted { weight: 1, item: 56}), - [50, 51, 52, 53, 54, 55, 56]); - } - - #[test] - fn test_weighted_clone_initialization() { - let initial : Weighted = Weighted {weight: 1, item: 1}; - let clone = initial.clone(); - assert_eq!(initial.weight, clone.weight); - assert_eq!(initial.item, clone.item); - } - - #[test] #[should_panic] - fn test_weighted_clone_change_weight() { - let initial : Weighted = Weighted {weight: 1, item: 1}; - let mut clone = initial.clone(); - clone.weight = 5; - assert_eq!(initial.weight, clone.weight); - } - - #[test] #[should_panic] - fn test_weighted_clone_change_item() { - let initial : Weighted = Weighted {weight: 1, item: 1}; - let mut clone = initial.clone(); - clone.item = 5; - assert_eq!(initial.item, clone.item); - - } - - #[test] #[should_panic] - fn test_weighted_choice_no_items() { - WeightedChoice::::new(&mut []); - } - #[test] #[should_panic] - fn test_weighted_choice_zero_weight() { - WeightedChoice::new(&mut [Weighted { weight: 0, item: 0}, - Weighted { weight: 0, item: 1}]); - } - #[test] #[should_panic] - fn test_weighted_choice_weight_overflows() { - let x = ::std::u32::MAX / 2; // x + x + 2 is the overflow - WeightedChoice::new(&mut [Weighted { weight: x, item: 0 }, - Weighted { weight: 1, item: 1 }, - Weighted { weight: x, item: 2 }, - Weighted { weight: 1, item: 3 }]); - } -} diff --git a/Chapter03/rand/src/distributions/normal.rs b/Chapter03/rand/src/distributions/normal.rs deleted file mode 100644 index 42872fa..0000000 --- a/Chapter03/rand/src/distributions/normal.rs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The normal and derived distributions. - -use {Rng, Rand, Open01}; -use distributions::{ziggurat, ziggurat_tables, Sample, IndependentSample}; - -/// A wrapper around an `f64` to generate N(0, 1) random numbers -/// (a.k.a. a standard normal, or Gaussian). -/// -/// See `Normal` for the general normal distribution. -/// -/// Implemented via the ZIGNOR variant[1] of the Ziggurat method. -/// -/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to -/// Generate Normal Random -/// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield -/// College, Oxford -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::normal::StandardNormal; -/// -/// let StandardNormal(x) = rand::random(); -/// println!("{}", x); -/// ``` -#[derive(Clone, Copy)] -pub struct StandardNormal(pub f64); - -impl Rand for StandardNormal { - fn rand(rng: &mut R) -> StandardNormal { - #[inline] - fn pdf(x: f64) -> f64 { - (-x*x/2.0).exp() - } - #[inline] - fn zero_case(rng: &mut R, u: f64) -> f64 { - // compute a random number in the tail by hand - - // strange initial conditions, because the loop is not - // do-while, so the condition should be true on the first - // run, they get overwritten anyway (0 < 1, so these are - // good). - let mut x = 1.0f64; - let mut y = 0.0f64; - - while -2.0 * y < x * x { - let Open01(x_) = rng.gen::>(); - let Open01(y_) = rng.gen::>(); - - x = x_.ln() / ziggurat_tables::ZIG_NORM_R; - y = y_.ln(); - } - - if u < 0.0 { x - ziggurat_tables::ZIG_NORM_R } else { ziggurat_tables::ZIG_NORM_R - x } - } - - StandardNormal(ziggurat( - rng, - true, // this is symmetric - &ziggurat_tables::ZIG_NORM_X, - &ziggurat_tables::ZIG_NORM_F, - pdf, zero_case)) - } -} - -/// The normal distribution `N(mean, std_dev**2)`. -/// -/// This uses the ZIGNOR variant of the Ziggurat method, see -/// `StandardNormal` for more details. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{Normal, IndependentSample}; -/// -/// // mean 2, standard deviation 3 -/// let normal = Normal::new(2.0, 3.0); -/// let v = normal.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from a N(2, 9) distribution", v) -/// ``` -#[derive(Clone, Copy)] -pub struct Normal { - mean: f64, - std_dev: f64, -} - -impl Normal { - /// Construct a new `Normal` distribution with the given mean and - /// standard deviation. - /// - /// # Panics - /// - /// Panics if `std_dev < 0`. - #[inline] - pub fn new(mean: f64, std_dev: f64) -> Normal { - assert!(std_dev >= 0.0, "Normal::new called with `std_dev` < 0"); - Normal { - mean: mean, - std_dev: std_dev - } - } -} -impl Sample for Normal { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for Normal { - fn ind_sample(&self, rng: &mut R) -> f64 { - let StandardNormal(n) = rng.gen::(); - self.mean + self.std_dev * n - } -} - - -/// The log-normal distribution `ln N(mean, std_dev**2)`. -/// -/// If `X` is log-normal distributed, then `ln(X)` is `N(mean, -/// std_dev**2)` distributed. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{LogNormal, IndependentSample}; -/// -/// // mean 2, standard deviation 3 -/// let log_normal = LogNormal::new(2.0, 3.0); -/// let v = log_normal.ind_sample(&mut rand::thread_rng()); -/// println!("{} is from an ln N(2, 9) distribution", v) -/// ``` -#[derive(Clone, Copy)] -pub struct LogNormal { - norm: Normal -} - -impl LogNormal { - /// Construct a new `LogNormal` distribution with the given mean - /// and standard deviation. - /// - /// # Panics - /// - /// Panics if `std_dev < 0`. - #[inline] - pub fn new(mean: f64, std_dev: f64) -> LogNormal { - assert!(std_dev >= 0.0, "LogNormal::new called with `std_dev` < 0"); - LogNormal { norm: Normal::new(mean, std_dev) } - } -} -impl Sample for LogNormal { - fn sample(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) } -} -impl IndependentSample for LogNormal { - fn ind_sample(&self, rng: &mut R) -> f64 { - self.norm.ind_sample(rng).exp() - } -} - -#[cfg(test)] -mod tests { - use distributions::{Sample, IndependentSample}; - use super::{Normal, LogNormal}; - - #[test] - fn test_normal() { - let mut norm = Normal::new(10.0, 10.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - norm.sample(&mut rng); - norm.ind_sample(&mut rng); - } - } - #[test] - #[should_panic] - fn test_normal_invalid_sd() { - Normal::new(10.0, -1.0); - } - - - #[test] - fn test_log_normal() { - let mut lnorm = LogNormal::new(10.0, 10.0); - let mut rng = ::test::rng(); - for _ in 0..1000 { - lnorm.sample(&mut rng); - lnorm.ind_sample(&mut rng); - } - } - #[test] - #[should_panic] - fn test_log_normal_invalid_sd() { - LogNormal::new(10.0, -1.0); - } -} diff --git a/Chapter03/rand/src/distributions/range.rs b/Chapter03/rand/src/distributions/range.rs deleted file mode 100644 index 3a3f3e7..0000000 --- a/Chapter03/rand/src/distributions/range.rs +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Generating numbers between two others. - -// this is surprisingly complicated to be both generic & correct - -use std::num::Wrapping as w; - -use Rng; -use distributions::{Sample, IndependentSample}; - -/// Sample values uniformly between two bounds. -/// -/// This gives a uniform distribution (assuming the RNG used to sample -/// it is itself uniform & the `SampleRange` implementation for the -/// given type is correct), even for edge cases like `low = 0u8`, -/// `high = 170u8`, for which a naive modulo operation would return -/// numbers less than 85 with double the probability to those greater -/// than 85. -/// -/// Types should attempt to sample in `[low, high)`, i.e., not -/// including `high`, but this may be very difficult. All the -/// primitive integer types satisfy this property, and the float types -/// normally satisfy it, but rounding may mean `high` can occur. -/// -/// # Example -/// -/// ```rust -/// use rand::distributions::{IndependentSample, Range}; -/// -/// fn main() { -/// let between = Range::new(10, 10000); -/// let mut rng = rand::thread_rng(); -/// let mut sum = 0; -/// for _ in 0..1000 { -/// sum += between.ind_sample(&mut rng); -/// } -/// println!("{}", sum); -/// } -/// ``` -#[derive(Clone, Copy)] -pub struct Range { - low: X, - range: X, - accept_zone: X -} - -impl Range { - /// Create a new `Range` instance that samples uniformly from - /// `[low, high)`. Panics if `low >= high`. - pub fn new(low: X, high: X) -> Range { - assert!(low < high, "Range::new called with `low >= high`"); - SampleRange::construct_range(low, high) - } -} - -impl Sample for Range { - #[inline] - fn sample(&mut self, rng: &mut R) -> Sup { self.ind_sample(rng) } -} -impl IndependentSample for Range { - fn ind_sample(&self, rng: &mut R) -> Sup { - SampleRange::sample_range(self, rng) - } -} - -/// The helper trait for types that have a sensible way to sample -/// uniformly between two values. This should not be used directly, -/// and is only to facilitate `Range`. -pub trait SampleRange : Sized { - /// Construct the `Range` object that `sample_range` - /// requires. This should not ever be called directly, only via - /// `Range::new`, which will check that `low < high`, so this - /// function doesn't have to repeat the check. - fn construct_range(low: Self, high: Self) -> Range; - - /// Sample a value from the given `Range` with the given `Rng` as - /// a source of randomness. - fn sample_range(r: &Range, rng: &mut R) -> Self; -} - -macro_rules! integer_impl { - ($ty:ty, $unsigned:ident) => { - impl SampleRange for $ty { - // we play free and fast with unsigned vs signed here - // (when $ty is signed), but that's fine, since the - // contract of this macro is for $ty and $unsigned to be - // "bit-equal", so casting between them is a no-op & a - // bijection. - - #[inline] - fn construct_range(low: $ty, high: $ty) -> Range<$ty> { - let range = (w(high as $unsigned) - w(low as $unsigned)).0; - let unsigned_max: $unsigned = ::std::$unsigned::MAX; - - // this is the largest number that fits into $unsigned - // that `range` divides evenly, so, if we've sampled - // `n` uniformly from this region, then `n % range` is - // uniform in [0, range) - let zone = unsigned_max - unsigned_max % range; - - Range { - low: low, - range: range as $ty, - accept_zone: zone as $ty - } - } - - #[inline] - fn sample_range(r: &Range<$ty>, rng: &mut R) -> $ty { - loop { - // rejection sample - let v = rng.gen::<$unsigned>(); - // until we find something that fits into the - // region which r.range evenly divides (this will - // be uniformly distributed) - if v < r.accept_zone as $unsigned { - // and return it, with some adjustments - return (w(r.low) + w((v % r.range as $unsigned) as $ty)).0; - } - } - } - } - } -} - -integer_impl! { i8, u8 } -integer_impl! { i16, u16 } -integer_impl! { i32, u32 } -integer_impl! { i64, u64 } -integer_impl! { isize, usize } -integer_impl! { u8, u8 } -integer_impl! { u16, u16 } -integer_impl! { u32, u32 } -integer_impl! { u64, u64 } -integer_impl! { usize, usize } - -macro_rules! float_impl { - ($ty:ty) => { - impl SampleRange for $ty { - fn construct_range(low: $ty, high: $ty) -> Range<$ty> { - Range { - low: low, - range: high - low, - accept_zone: 0.0 // unused - } - } - fn sample_range(r: &Range<$ty>, rng: &mut R) -> $ty { - r.low + r.range * rng.gen::<$ty>() - } - } - } -} - -float_impl! { f32 } -float_impl! { f64 } - -#[cfg(test)] -mod tests { - use distributions::{Sample, IndependentSample}; - use super::Range as Range; - - #[should_panic] - #[test] - fn test_range_bad_limits_equal() { - Range::new(10, 10); - } - #[should_panic] - #[test] - fn test_range_bad_limits_flipped() { - Range::new(10, 5); - } - - #[test] - fn test_integers() { - let mut rng = ::test::rng(); - macro_rules! t { - ($($ty:ident),*) => {{ - $( - let v: &[($ty, $ty)] = &[(0, 10), - (10, 127), - (::std::$ty::MIN, ::std::$ty::MAX)]; - for &(low, high) in v.iter() { - let mut sampler: Range<$ty> = Range::new(low, high); - for _ in 0..1000 { - let v = sampler.sample(&mut rng); - assert!(low <= v && v < high); - let v = sampler.ind_sample(&mut rng); - assert!(low <= v && v < high); - } - } - )* - }} - } - t!(i8, i16, i32, i64, isize, - u8, u16, u32, u64, usize) - } - - #[test] - fn test_floats() { - let mut rng = ::test::rng(); - macro_rules! t { - ($($ty:ty),*) => {{ - $( - let v: &[($ty, $ty)] = &[(0.0, 100.0), - (-1e35, -1e25), - (1e-35, 1e-25), - (-1e35, 1e35)]; - for &(low, high) in v.iter() { - let mut sampler: Range<$ty> = Range::new(low, high); - for _ in 0..1000 { - let v = sampler.sample(&mut rng); - assert!(low <= v && v < high); - let v = sampler.ind_sample(&mut rng); - assert!(low <= v && v < high); - } - } - )* - }} - } - - t!(f32, f64) - } - -} diff --git a/Chapter03/rand/src/distributions/ziggurat_tables.rs b/Chapter03/rand/src/distributions/ziggurat_tables.rs deleted file mode 100644 index b6de4bf..0000000 --- a/Chapter03/rand/src/distributions/ziggurat_tables.rs +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Tables for distributions which are sampled using the ziggurat -// algorithm. Autogenerated by `ziggurat_tables.py`. - -pub type ZigTable = &'static [f64; 257]; -pub const ZIG_NORM_R: f64 = 3.654152885361008796; -pub static ZIG_NORM_X: [f64; 257] = - [3.910757959537090045, 3.654152885361008796, 3.449278298560964462, 3.320244733839166074, - 3.224575052047029100, 3.147889289517149969, 3.083526132001233044, 3.027837791768635434, - 2.978603279880844834, 2.934366867207854224, 2.894121053612348060, 2.857138730872132548, - 2.822877396825325125, 2.790921174000785765, 2.760944005278822555, 2.732685359042827056, - 2.705933656121858100, 2.680514643284522158, 2.656283037575502437, 2.633116393630324570, - 2.610910518487548515, 2.589575986706995181, 2.569035452680536569, 2.549221550323460761, - 2.530075232158516929, 2.511544441625342294, 2.493583041269680667, 2.476149939669143318, - 2.459208374333311298, 2.442725318198956774, 2.426670984935725972, 2.411018413899685520, - 2.395743119780480601, 2.380822795170626005, 2.366237056715818632, 2.351967227377659952, - 2.337996148795031370, 2.324308018869623016, 2.310888250599850036, 2.297723348901329565, - 2.284800802722946056, 2.272108990226823888, 2.259637095172217780, 2.247375032945807760, - 2.235313384928327984, 2.223443340090905718, 2.211756642882544366, 2.200245546609647995, - 2.188902771624720689, 2.177721467738641614, 2.166695180352645966, 2.155817819875063268, - 2.145083634046203613, 2.134487182844320152, 2.124023315687815661, 2.113687150684933957, - 2.103474055713146829, 2.093379631137050279, 2.083399693996551783, 2.073530263516978778, - 2.063767547809956415, 2.054107931648864849, 2.044547965215732788, 2.035084353727808715, - 2.025713947862032960, 2.016433734904371722, 2.007240830558684852, 1.998132471356564244, - 1.989106007615571325, 1.980158896898598364, 1.971288697931769640, 1.962493064942461896, - 1.953769742382734043, 1.945116560006753925, 1.936531428273758904, 1.928012334050718257, - 1.919557336591228847, 1.911164563769282232, 1.902832208548446369, 1.894558525668710081, - 1.886341828534776388, 1.878180486290977669, 1.870072921069236838, 1.862017605397632281, - 1.854013059758148119, 1.846057850283119750, 1.838150586580728607, 1.830289919680666566, - 1.822474540091783224, 1.814703175964167636, 1.806974591348693426, 1.799287584547580199, - 1.791640986550010028, 1.784033659547276329, 1.776464495522344977, 1.768932414909077933, - 1.761436365316706665, 1.753975320315455111, 1.746548278279492994, 1.739154261283669012, - 1.731792314050707216, 1.724461502945775715, 1.717160915015540690, 1.709889657069006086, - 1.702646854797613907, 1.695431651932238548, 1.688243209434858727, 1.681080704722823338, - 1.673943330923760353, 1.666830296159286684, 1.659740822855789499, 1.652674147080648526, - 1.645629517902360339, 1.638606196773111146, 1.631603456932422036, 1.624620582830568427, - 1.617656869570534228, 1.610711622367333673, 1.603784156023583041, 1.596873794420261339, - 1.589979870021648534, 1.583101723393471438, 1.576238702733332886, 1.569390163412534456, - 1.562555467528439657, 1.555733983466554893, 1.548925085471535512, 1.542128153226347553, - 1.535342571438843118, 1.528567729435024614, 1.521803020758293101, 1.515047842773992404, - 1.508301596278571965, 1.501563685112706548, 1.494833515777718391, 1.488110497054654369, - 1.481394039625375747, 1.474683555695025516, 1.467978458615230908, 1.461278162507407830, - 1.454582081885523293, 1.447889631277669675, 1.441200224845798017, 1.434513276002946425, - 1.427828197027290358, 1.421144398672323117, 1.414461289772464658, 1.407778276843371534, - 1.401094763676202559, 1.394410150925071257, 1.387723835686884621, 1.381035211072741964, - 1.374343665770030531, 1.367648583594317957, 1.360949343030101844, 1.354245316759430606, - 1.347535871177359290, 1.340820365893152122, 1.334098153216083604, 1.327368577624624679, - 1.320630975217730096, 1.313884673146868964, 1.307128989027353860, 1.300363230327433728, - 1.293586693733517645, 1.286798664489786415, 1.279998415710333237, 1.273185207661843732, - 1.266358287014688333, 1.259516886060144225, 1.252660221891297887, 1.245787495544997903, - 1.238897891102027415, 1.231990574742445110, 1.225064693752808020, 1.218119375481726552, - 1.211153726239911244, 1.204166830140560140, 1.197157747875585931, 1.190125515422801650, - 1.183069142678760732, 1.175987612011489825, 1.168879876726833800, 1.161744859441574240, - 1.154581450355851802, 1.147388505416733873, 1.140164844363995789, 1.132909248648336975, - 1.125620459211294389, 1.118297174115062909, 1.110938046009249502, 1.103541679420268151, - 1.096106627847603487, 1.088631390649514197, 1.081114409698889389, 1.073554065787871714, - 1.065948674757506653, 1.058296483326006454, 1.050595664586207123, 1.042844313139370538, - 1.035040439828605274, 1.027181966030751292, 1.019266717460529215, 1.011292417434978441, - 1.003256679539591412, 0.995156999629943084, 0.986990747093846266, 0.978755155288937750, - 0.970447311058864615, 0.962064143217605250, 0.953602409875572654, 0.945058684462571130, - 0.936429340280896860, 0.927710533396234771, 0.918898183643734989, 0.909987953490768997, - 0.900975224455174528, 0.891855070726792376, 0.882622229578910122, 0.873271068082494550, - 0.863795545546826915, 0.854189171001560554, 0.844444954902423661, 0.834555354079518752, - 0.824512208745288633, 0.814306670128064347, 0.803929116982664893, 0.793369058833152785, - 0.782615023299588763, 0.771654424216739354, 0.760473406422083165, 0.749056662009581653, - 0.737387211425838629, 0.725446140901303549, 0.713212285182022732, 0.700661841097584448, - 0.687767892786257717, 0.674499822827436479, 0.660822574234205984, 0.646695714884388928, - 0.632072236375024632, 0.616896989996235545, 0.601104617743940417, 0.584616766093722262, - 0.567338257040473026, 0.549151702313026790, 0.529909720646495108, 0.509423329585933393, - 0.487443966121754335, 0.463634336771763245, 0.437518402186662658, 0.408389134588000746, - 0.375121332850465727, 0.335737519180459465, 0.286174591747260509, 0.215241895913273806, - 0.000000000000000000]; -pub static ZIG_NORM_F: [f64; 257] = - [0.000477467764586655, 0.001260285930498598, 0.002609072746106363, 0.004037972593371872, - 0.005522403299264754, 0.007050875471392110, 0.008616582769422917, 0.010214971439731100, - 0.011842757857943104, 0.013497450601780807, 0.015177088307982072, 0.016880083152595839, - 0.018605121275783350, 0.020351096230109354, 0.022117062707379922, 0.023902203305873237, - 0.025705804008632656, 0.027527235669693315, 0.029365939758230111, 0.031221417192023690, - 0.033093219458688698, 0.034980941461833073, 0.036884215688691151, 0.038802707404656918, - 0.040736110656078753, 0.042684144916619378, 0.044646552251446536, 0.046623094902089664, - 0.048613553216035145, 0.050617723861121788, 0.052635418276973649, 0.054666461325077916, - 0.056710690106399467, 0.058767952921137984, 0.060838108349751806, 0.062921024437977854, - 0.065016577971470438, 0.067124653828023989, 0.069245144397250269, 0.071377949059141965, - 0.073522973714240991, 0.075680130359194964, 0.077849336702372207, 0.080030515814947509, - 0.082223595813495684, 0.084428509570654661, 0.086645194450867782, 0.088873592068594229, - 0.091113648066700734, 0.093365311913026619, 0.095628536713353335, 0.097903279039215627, - 0.100189498769172020, 0.102487158942306270, 0.104796225622867056, 0.107116667775072880, - 0.109448457147210021, 0.111791568164245583, 0.114145977828255210, 0.116511665626037014, - 0.118888613443345698, 0.121276805485235437, 0.123676228202051403, 0.126086870220650349, - 0.128508722280473636, 0.130941777174128166, 0.133386029692162844, 0.135841476571757352, - 0.138308116449064322, 0.140785949814968309, 0.143274978974047118, 0.145775208006537926, - 0.148286642733128721, 0.150809290682410169, 0.153343161060837674, 0.155888264725064563, - 0.158444614156520225, 0.161012223438117663, 0.163591108232982951, 0.166181285765110071, - 0.168782774801850333, 0.171395595638155623, 0.174019770082499359, 0.176655321444406654, - 0.179302274523530397, 0.181960655600216487, 0.184630492427504539, 0.187311814224516926, - 0.190004651671193070, 0.192709036904328807, 0.195425003514885592, 0.198152586546538112, - 0.200891822495431333, 0.203642749311121501, 0.206405406398679298, 0.209179834621935651, - 0.211966076307852941, 0.214764175252008499, 0.217574176725178370, 0.220396127481011589, - 0.223230075764789593, 0.226076071323264877, 0.228934165415577484, 0.231804410825248525, - 0.234686861873252689, 0.237581574432173676, 0.240488605941449107, 0.243408015423711988, - 0.246339863502238771, 0.249284212419516704, 0.252241126056943765, 0.255210669955677150, - 0.258192911338648023, 0.261187919133763713, 0.264195763998317568, 0.267216518344631837, - 0.270250256366959984, 0.273297054069675804, 0.276356989296781264, 0.279430141762765316, - 0.282516593084849388, 0.285616426816658109, 0.288729728483353931, 0.291856585618280984, - 0.294997087801162572, 0.298151326697901342, 0.301319396102034120, 0.304501391977896274, - 0.307697412505553769, 0.310907558127563710, 0.314131931597630143, 0.317370638031222396, - 0.320623784958230129, 0.323891482377732021, 0.327173842814958593, 0.330470981380537099, - 0.333783015832108509, 0.337110066638412809, 0.340452257045945450, 0.343809713148291340, - 0.347182563958251478, 0.350570941482881204, 0.353974980801569250, 0.357394820147290515, - 0.360830600991175754, 0.364282468130549597, 0.367750569780596226, 0.371235057669821344, - 0.374736087139491414, 0.378253817247238111, 0.381788410875031348, 0.385340034841733958, - 0.388908860020464597, 0.392495061461010764, 0.396098818517547080, 0.399720314981931668, - 0.403359739222868885, 0.407017284331247953, 0.410693148271983222, 0.414387534042706784, - 0.418100649839684591, 0.421832709231353298, 0.425583931339900579, 0.429354541031341519, - 0.433144769114574058, 0.436954852549929273, 0.440785034667769915, 0.444635565397727750, - 0.448506701509214067, 0.452398706863882505, 0.456311852680773566, 0.460246417814923481, - 0.464202689050278838, 0.468180961407822172, 0.472181538469883255, 0.476204732721683788, - 0.480250865911249714, 0.484320269428911598, 0.488413284707712059, 0.492530263646148658, - 0.496671569054796314, 0.500837575128482149, 0.505028667945828791, 0.509245245998136142, - 0.513487720749743026, 0.517756517232200619, 0.522052074674794864, 0.526374847174186700, - 0.530725304406193921, 0.535103932383019565, 0.539511234259544614, 0.543947731192649941, - 0.548413963257921133, 0.552910490428519918, 0.557437893621486324, 0.561996775817277916, - 0.566587763258951771, 0.571211506738074970, 0.575868682975210544, 0.580559996103683473, - 0.585286179266300333, 0.590047996335791969, 0.594846243770991268, 0.599681752622167719, - 0.604555390700549533, 0.609468064928895381, 0.614420723892076803, 0.619414360609039205, - 0.624450015550274240, 0.629528779928128279, 0.634651799290960050, 0.639820277456438991, - 0.645035480824251883, 0.650298743114294586, 0.655611470583224665, 0.660975147780241357, - 0.666391343912380640, 0.671861719900766374, 0.677388036222513090, 0.682972161648791376, - 0.688616083008527058, 0.694321916130032579, 0.700091918140490099, 0.705928501336797409, - 0.711834248882358467, 0.717811932634901395, 0.723864533472881599, 0.729995264565802437, - 0.736207598131266683, 0.742505296344636245, 0.748892447223726720, 0.755373506511754500, - 0.761953346841546475, 0.768637315803334831, 0.775431304986138326, 0.782341832659861902, - 0.789376143571198563, 0.796542330428254619, 0.803849483176389490, 0.811307874318219935, - 0.818929191609414797, 0.826726833952094231, 0.834716292992930375, 0.842915653118441077, - 0.851346258465123684, 0.860033621203008636, 0.869008688043793165, 0.878309655816146839, - 0.887984660763399880, 0.898095921906304051, 0.908726440060562912, 0.919991505048360247, - 0.932060075968990209, 0.945198953453078028, 0.959879091812415930, 0.977101701282731328, - 1.000000000000000000]; -pub const ZIG_EXP_R: f64 = 7.697117470131050077; -pub static ZIG_EXP_X: [f64; 257] = - [8.697117470131052741, 7.697117470131050077, 6.941033629377212577, 6.478378493832569696, - 6.144164665772472667, 5.882144315795399869, 5.666410167454033697, 5.482890627526062488, - 5.323090505754398016, 5.181487281301500047, 5.054288489981304089, 4.938777085901250530, - 4.832939741025112035, 4.735242996601741083, 4.644491885420085175, 4.559737061707351380, - 4.480211746528421912, 4.405287693473573185, 4.334443680317273007, 4.267242480277365857, - 4.203313713735184365, 4.142340865664051464, 4.084051310408297830, 4.028208544647936762, - 3.974606066673788796, 3.923062500135489739, 3.873417670399509127, 3.825529418522336744, - 3.779270992411667862, 3.734528894039797375, 3.691201090237418825, 3.649195515760853770, - 3.608428813128909507, 3.568825265648337020, 3.530315889129343354, 3.492837654774059608, - 3.456332821132760191, 3.420748357251119920, 3.386035442460300970, 3.352149030900109405, - 3.319047470970748037, 3.286692171599068679, 3.255047308570449882, 3.224079565286264160, - 3.193757903212240290, 3.164053358025972873, 3.134938858084440394, 3.106389062339824481, - 3.078380215254090224, 3.050890016615455114, 3.023897504455676621, 2.997382949516130601, - 2.971327759921089662, 2.945714394895045718, 2.920526286512740821, 2.895747768600141825, - 2.871364012015536371, 2.847360965635188812, 2.823725302450035279, 2.800444370250737780, - 2.777506146439756574, 2.754899196562344610, 2.732612636194700073, 2.710636095867928752, - 2.688959688741803689, 2.667573980773266573, 2.646469963151809157, 2.625639026797788489, - 2.605072938740835564, 2.584763820214140750, 2.564704126316905253, 2.544886627111869970, - 2.525304390037828028, 2.505950763528594027, 2.486819361740209455, 2.467904050297364815, - 2.449198932978249754, 2.430698339264419694, 2.412396812688870629, 2.394289099921457886, - 2.376370140536140596, 2.358635057409337321, 2.341079147703034380, 2.323697874390196372, - 2.306486858283579799, 2.289441870532269441, 2.272558825553154804, 2.255833774367219213, - 2.239262898312909034, 2.222842503111036816, 2.206569013257663858, 2.190438966723220027, - 2.174449009937774679, 2.158595893043885994, 2.142876465399842001, 2.127287671317368289, - 2.111826546019042183, 2.096490211801715020, 2.081275874393225145, 2.066180819490575526, - 2.051202409468584786, 2.036338080248769611, 2.021585338318926173, 2.006941757894518563, - 1.992404978213576650, 1.977972700957360441, 1.963642687789548313, 1.949412758007184943, - 1.935280786297051359, 1.921244700591528076, 1.907302480018387536, 1.893452152939308242, - 1.879691795072211180, 1.866019527692827973, 1.852433515911175554, 1.838931967018879954, - 1.825513128903519799, 1.812175288526390649, 1.798916770460290859, 1.785735935484126014, - 1.772631179231305643, 1.759600930889074766, 1.746643651946074405, 1.733757834985571566, - 1.720942002521935299, 1.708194705878057773, 1.695514524101537912, 1.682900062917553896, - 1.670349953716452118, 1.657862852574172763, 1.645437439303723659, 1.633072416535991334, - 1.620766508828257901, 1.608518461798858379, 1.596327041286483395, 1.584191032532688892, - 1.572109239386229707, 1.560080483527888084, 1.548103603714513499, 1.536177455041032092, - 1.524300908219226258, 1.512472848872117082, 1.500692176842816750, 1.488957805516746058, - 1.477268661156133867, 1.465623682245745352, 1.454021818848793446, 1.442462031972012504, - 1.430943292938879674, 1.419464582769983219, 1.408024891569535697, 1.396623217917042137, - 1.385258568263121992, 1.373929956328490576, 1.362636402505086775, 1.351376933258335189, - 1.340150580529504643, 1.328956381137116560, 1.317793376176324749, 1.306660610415174117, - 1.295557131686601027, 1.284481990275012642, 1.273434238296241139, 1.262412929069615330, - 1.251417116480852521, 1.240445854334406572, 1.229498195693849105, 1.218573192208790124, - 1.207669893426761121, 1.196787346088403092, 1.185924593404202199, 1.175080674310911677, - 1.164254622705678921, 1.153445466655774743, 1.142652227581672841, 1.131873919411078511, - 1.121109547701330200, 1.110358108727411031, 1.099618588532597308, 1.088889961938546813, - 1.078171191511372307, 1.067461226479967662, 1.056759001602551429, 1.046063435977044209, - 1.035373431790528542, 1.024687873002617211, 1.014005623957096480, 1.003325527915696735, - 0.992646405507275897, 0.981967053085062602, 0.971286240983903260, 0.960602711668666509, - 0.949915177764075969, 0.939222319955262286, 0.928522784747210395, 0.917815182070044311, - 0.907098082715690257, 0.896370015589889935, 0.885629464761751528, 0.874874866291025066, - 0.864104604811004484, 0.853317009842373353, 0.842510351810368485, 0.831682837734273206, - 0.820832606554411814, 0.809957724057418282, 0.799056177355487174, 0.788125868869492430, - 0.777164609759129710, 0.766170112735434672, 0.755139984181982249, 0.744071715500508102, - 0.732962673584365398, 0.721810090308756203, 0.710611050909655040, 0.699362481103231959, - 0.688061132773747808, 0.676703568029522584, 0.665286141392677943, 0.653804979847664947, - 0.642255960424536365, 0.630634684933490286, 0.618936451394876075, 0.607156221620300030, - 0.595288584291502887, 0.583327712748769489, 0.571267316532588332, 0.559100585511540626, - 0.546820125163310577, 0.534417881237165604, 0.521885051592135052, 0.509211982443654398, - 0.496388045518671162, 0.483401491653461857, 0.470239275082169006, 0.456886840931420235, - 0.443327866073552401, 0.429543940225410703, 0.415514169600356364, 0.401214678896277765, - 0.386617977941119573, 0.371692145329917234, 0.356399760258393816, 0.340696481064849122, - 0.324529117016909452, 0.307832954674932158, 0.290527955491230394, 0.272513185478464703, - 0.253658363385912022, 0.233790483059674731, 0.212671510630966620, 0.189958689622431842, - 0.165127622564187282, 0.137304980940012589, 0.104838507565818778, 0.063852163815001570, - 0.000000000000000000]; -pub static ZIG_EXP_F: [f64; 257] = - [0.000167066692307963, 0.000454134353841497, 0.000967269282327174, 0.001536299780301573, - 0.002145967743718907, 0.002788798793574076, 0.003460264777836904, 0.004157295120833797, - 0.004877655983542396, 0.005619642207205489, 0.006381905937319183, 0.007163353183634991, - 0.007963077438017043, 0.008780314985808977, 0.009614413642502212, 0.010464810181029981, - 0.011331013597834600, 0.012212592426255378, 0.013109164931254991, 0.014020391403181943, - 0.014945968011691148, 0.015885621839973156, 0.016839106826039941, 0.017806200410911355, - 0.018786700744696024, 0.019780424338009740, 0.020787204072578114, 0.021806887504283581, - 0.022839335406385240, 0.023884420511558174, 0.024942026419731787, 0.026012046645134221, - 0.027094383780955803, 0.028188948763978646, 0.029295660224637411, 0.030414443910466622, - 0.031545232172893622, 0.032687963508959555, 0.033842582150874358, 0.035009037697397431, - 0.036187284781931443, 0.037377282772959382, 0.038578995503074871, 0.039792391023374139, - 0.041017441380414840, 0.042254122413316254, 0.043502413568888197, 0.044762297732943289, - 0.046033761076175184, 0.047316792913181561, 0.048611385573379504, 0.049917534282706379, - 0.051235237055126281, 0.052564494593071685, 0.053905310196046080, 0.055257689676697030, - 0.056621641283742870, 0.057997175631200659, 0.059384305633420280, 0.060783046445479660, - 0.062193415408541036, 0.063615431999807376, 0.065049117786753805, 0.066494496385339816, - 0.067951593421936643, 0.069420436498728783, 0.070901055162371843, 0.072393480875708752, - 0.073897746992364746, 0.075413888734058410, 0.076941943170480517, 0.078481949201606435, - 0.080033947542319905, 0.081597980709237419, 0.083174093009632397, 0.084762330532368146, - 0.086362741140756927, 0.087975374467270231, 0.089600281910032886, 0.091237516631040197, - 0.092887133556043569, 0.094549189376055873, 0.096223742550432825, 0.097910853311492213, - 0.099610583670637132, 0.101322997425953631, 0.103048160171257702, 0.104786139306570145, - 0.106537004050001632, 0.108300825451033755, 0.110077676405185357, 0.111867631670056283, - 0.113670767882744286, 0.115487163578633506, 0.117316899211555525, 0.119160057175327641, - 0.121016721826674792, 0.122886979509545108, 0.124770918580830933, 0.126668629437510671, - 0.128580204545228199, 0.130505738468330773, 0.132445327901387494, 0.134399071702213602, - 0.136367070926428829, 0.138349428863580176, 0.140346251074862399, 0.142357645432472146, - 0.144383722160634720, 0.146424593878344889, 0.148480375643866735, 0.150551185001039839, - 0.152637142027442801, 0.154738369384468027, 0.156854992369365148, 0.158987138969314129, - 0.161134939917591952, 0.163298528751901734, 0.165478041874935922, 0.167673618617250081, - 0.169885401302527550, 0.172113535315319977, 0.174358169171353411, 0.176619454590494829, - 0.178897546572478278, 0.181192603475496261, 0.183504787097767436, 0.185834262762197083, - 0.188181199404254262, 0.190545769663195363, 0.192928149976771296, 0.195328520679563189, - 0.197747066105098818, 0.200183974691911210, 0.202639439093708962, 0.205113656293837654, - 0.207606827724221982, 0.210119159388988230, 0.212650861992978224, 0.215202151075378628, - 0.217773247148700472, 0.220364375843359439, 0.222975768058120111, 0.225607660116683956, - 0.228260293930716618, 0.230933917169627356, 0.233628783437433291, 0.236345152457059560, - 0.239083290262449094, 0.241843469398877131, 0.244625969131892024, 0.247431075665327543, - 0.250259082368862240, 0.253110290015629402, 0.255985007030415324, 0.258883549749016173, - 0.261806242689362922, 0.264753418835062149, 0.267725419932044739, 0.270722596799059967, - 0.273745309652802915, 0.276793928448517301, 0.279868833236972869, 0.282970414538780746, - 0.286099073737076826, 0.289255223489677693, 0.292439288161892630, 0.295651704281261252, - 0.298892921015581847, 0.302163400675693528, 0.305463619244590256, 0.308794066934560185, - 0.312155248774179606, 0.315547685227128949, 0.318971912844957239, 0.322428484956089223, - 0.325917972393556354, 0.329440964264136438, 0.332998068761809096, 0.336589914028677717, - 0.340217149066780189, 0.343880444704502575, 0.347580494621637148, 0.351318016437483449, - 0.355093752866787626, 0.358908472948750001, 0.362762973354817997, 0.366658079781514379, - 0.370594648435146223, 0.374573567615902381, 0.378595759409581067, 0.382662181496010056, - 0.386773829084137932, 0.390931736984797384, 0.395136981833290435, 0.399390684475231350, - 0.403694012530530555, 0.408048183152032673, 0.412454465997161457, 0.416914186433003209, - 0.421428728997616908, 0.425999541143034677, 0.430628137288459167, 0.435316103215636907, - 0.440065100842354173, 0.444876873414548846, 0.449753251162755330, 0.454696157474615836, - 0.459707615642138023, 0.464789756250426511, 0.469944825283960310, 0.475175193037377708, - 0.480483363930454543, 0.485871987341885248, 0.491343869594032867, 0.496901987241549881, - 0.502549501841348056, 0.508289776410643213, 0.514126393814748894, 0.520063177368233931, - 0.526104213983620062, 0.532253880263043655, 0.538516872002862246, 0.544898237672440056, - 0.551403416540641733, 0.558038282262587892, 0.564809192912400615, 0.571723048664826150, - 0.578787358602845359, 0.586010318477268366, 0.593400901691733762, 0.600968966365232560, - 0.608725382079622346, 0.616682180915207878, 0.624852738703666200, 0.633251994214366398, - 0.641896716427266423, 0.650805833414571433, 0.660000841079000145, 0.669506316731925177, - 0.679350572264765806, 0.689566496117078431, 0.700192655082788606, 0.711274760805076456, - 0.722867659593572465, 0.735038092431424039, 0.747868621985195658, 0.761463388849896838, - 0.775956852040116218, 0.791527636972496285, 0.808421651523009044, 0.826993296643051101, - 0.847785500623990496, 0.871704332381204705, 0.900469929925747703, 0.938143680862176477, - 1.000000000000000000]; diff --git a/Chapter03/rand/src/isaac.rs b/Chapter03/rand/src/isaac.rs deleted file mode 100644 index b70a8e6..0000000 --- a/Chapter03/rand/src/isaac.rs +++ /dev/null @@ -1,635 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The ISAAC random number generator. - -#![allow(non_camel_case_types)] - -use std::slice; -use std::iter::repeat; -use std::num::Wrapping as w; -use std::fmt; - -use {Rng, SeedableRng, Rand, w32, w64}; - -const RAND_SIZE_LEN: usize = 8; -const RAND_SIZE: u32 = 1 << RAND_SIZE_LEN; -const RAND_SIZE_USIZE: usize = 1 << RAND_SIZE_LEN; - -/// A random number generator that uses the ISAAC algorithm[1]. -/// -/// The ISAAC algorithm is generally accepted as suitable for -/// cryptographic purposes, but this implementation has not be -/// verified as such. Prefer a generator like `OsRng` that defers to -/// the operating system for cases that need high security. -/// -/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number -/// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html) -#[derive(Copy)] -pub struct IsaacRng { - cnt: u32, - rsl: [w32; RAND_SIZE_USIZE], - mem: [w32; RAND_SIZE_USIZE], - a: w32, - b: w32, - c: w32, -} - -static EMPTY: IsaacRng = IsaacRng { - cnt: 0, - rsl: [w(0); RAND_SIZE_USIZE], - mem: [w(0); RAND_SIZE_USIZE], - a: w(0), b: w(0), c: w(0), -}; - -impl IsaacRng { - - /// Create an ISAAC random number generator using the default - /// fixed seed. - pub fn new_unseeded() -> IsaacRng { - let mut rng = EMPTY; - rng.init(false); - rng - } - - /// Initialises `self`. If `use_rsl` is true, then use the current value - /// of `rsl` as a seed, otherwise construct one algorithmically (not - /// randomly). - fn init(&mut self, use_rsl: bool) { - let mut a = w(0x9e3779b9); - let mut b = a; - let mut c = a; - let mut d = a; - let mut e = a; - let mut f = a; - let mut g = a; - let mut h = a; - - macro_rules! mix { - () => {{ - a=a^(b<<11); d=d+a; b=b+c; - b=b^(c>>2); e=e+b; c=c+d; - c=c^(d<<8); f=f+c; d=d+e; - d=d^(e>>16); g=g+d; e=e+f; - e=e^(f<<10); h=h+e; f=f+g; - f=f^(g>>4); a=a+f; g=g+h; - g=g^(h<<8); b=b+g; h=h+a; - h=h^(a>>9); c=c+h; a=a+b; - }} - } - - for _ in 0..4 { - mix!(); - } - - if use_rsl { - macro_rules! memloop { - ($arr:expr) => {{ - for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) { - a=a+$arr[i ]; b=b+$arr[i+1]; - c=c+$arr[i+2]; d=d+$arr[i+3]; - e=e+$arr[i+4]; f=f+$arr[i+5]; - g=g+$arr[i+6]; h=h+$arr[i+7]; - mix!(); - self.mem[i ]=a; self.mem[i+1]=b; - self.mem[i+2]=c; self.mem[i+3]=d; - self.mem[i+4]=e; self.mem[i+5]=f; - self.mem[i+6]=g; self.mem[i+7]=h; - } - }} - } - - memloop!(self.rsl); - memloop!(self.mem); - } else { - for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) { - mix!(); - self.mem[i ]=a; self.mem[i+1]=b; - self.mem[i+2]=c; self.mem[i+3]=d; - self.mem[i+4]=e; self.mem[i+5]=f; - self.mem[i+6]=g; self.mem[i+7]=h; - } - } - - self.isaac(); - } - - /// Refills the output buffer (`self.rsl`) - #[inline] - fn isaac(&mut self) { - self.c = self.c + w(1); - // abbreviations - let mut a = self.a; - let mut b = self.b + self.c; - - const MIDPOINT: usize = RAND_SIZE_USIZE / 2; - - macro_rules! ind { - ($x:expr) => ( self.mem[($x >> 2usize).0 as usize & (RAND_SIZE_USIZE - 1)] ) - } - - let r = [(0, MIDPOINT), (MIDPOINT, 0)]; - for &(mr_offset, m2_offset) in r.iter() { - - macro_rules! rngstepp { - ($j:expr, $shift:expr) => {{ - let base = $j; - let mix = a << $shift; - - let x = self.mem[base + mr_offset]; - a = (a ^ mix) + self.mem[base + m2_offset]; - let y = ind!(x) + a + b; - self.mem[base + mr_offset] = y; - - b = ind!(y >> RAND_SIZE_LEN) + x; - self.rsl[base + mr_offset] = b; - }} - } - - macro_rules! rngstepn { - ($j:expr, $shift:expr) => {{ - let base = $j; - let mix = a >> $shift; - - let x = self.mem[base + mr_offset]; - a = (a ^ mix) + self.mem[base + m2_offset]; - let y = ind!(x) + a + b; - self.mem[base + mr_offset] = y; - - b = ind!(y >> RAND_SIZE_LEN) + x; - self.rsl[base + mr_offset] = b; - }} - } - - for i in (0..MIDPOINT/4).map(|i| i * 4) { - rngstepp!(i + 0, 13); - rngstepn!(i + 1, 6); - rngstepp!(i + 2, 2); - rngstepn!(i + 3, 16); - } - } - - self.a = a; - self.b = b; - self.cnt = RAND_SIZE; - } -} - -// Cannot be derived because [u32; 256] does not implement Clone -impl Clone for IsaacRng { - fn clone(&self) -> IsaacRng { - *self - } -} - -impl Rng for IsaacRng { - #[inline] - fn next_u32(&mut self) -> u32 { - if self.cnt == 0 { - // make some more numbers - self.isaac(); - } - self.cnt -= 1; - - // self.cnt is at most RAND_SIZE, but that is before the - // subtraction above. We want to index without bounds - // checking, but this could lead to incorrect code if someone - // misrefactors, so we check, sometimes. - // - // (Changes here should be reflected in Isaac64Rng.next_u64.) - debug_assert!(self.cnt < RAND_SIZE); - - // (the % is cheaply telling the optimiser that we're always - // in bounds, without unsafe. NB. this is a power of two, so - // it optimises to a bitwise mask). - self.rsl[(self.cnt % RAND_SIZE) as usize].0 - } -} - -impl<'a> SeedableRng<&'a [u32]> for IsaacRng { - fn reseed(&mut self, seed: &'a [u32]) { - // make the seed into [seed[0], seed[1], ..., seed[seed.len() - // - 1], 0, 0, ...], to fill rng.rsl. - let seed_iter = seed.iter().map(|&x| x).chain(repeat(0u32)); - - for (rsl_elem, seed_elem) in self.rsl.iter_mut().zip(seed_iter) { - *rsl_elem = w(seed_elem); - } - self.cnt = 0; - self.a = w(0); - self.b = w(0); - self.c = w(0); - - self.init(true); - } - - /// Create an ISAAC random number generator with a seed. This can - /// be any length, although the maximum number of elements used is - /// 256 and any more will be silently ignored. A generator - /// constructed with a given seed will generate the same sequence - /// of values as all other generators constructed with that seed. - fn from_seed(seed: &'a [u32]) -> IsaacRng { - let mut rng = EMPTY; - rng.reseed(seed); - rng - } -} - -impl Rand for IsaacRng { - fn rand(other: &mut R) -> IsaacRng { - let mut ret = EMPTY; - unsafe { - let ptr = ret.rsl.as_mut_ptr() as *mut u8; - - let slice = slice::from_raw_parts_mut(ptr, RAND_SIZE_USIZE * 4); - other.fill_bytes(slice); - } - ret.cnt = 0; - ret.a = w(0); - ret.b = w(0); - ret.c = w(0); - - ret.init(true); - return ret; - } -} - -impl fmt::Debug for IsaacRng { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "IsaacRng {{}}") - } -} - -const RAND_SIZE_64_LEN: usize = 8; -const RAND_SIZE_64: usize = 1 << RAND_SIZE_64_LEN; - -/// A random number generator that uses ISAAC-64[1], the 64-bit -/// variant of the ISAAC algorithm. -/// -/// The ISAAC algorithm is generally accepted as suitable for -/// cryptographic purposes, but this implementation has not be -/// verified as such. Prefer a generator like `OsRng` that defers to -/// the operating system for cases that need high security. -/// -/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number -/// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html) -#[derive(Copy)] -pub struct Isaac64Rng { - cnt: usize, - rsl: [w64; RAND_SIZE_64], - mem: [w64; RAND_SIZE_64], - a: w64, - b: w64, - c: w64, -} - -static EMPTY_64: Isaac64Rng = Isaac64Rng { - cnt: 0, - rsl: [w(0); RAND_SIZE_64], - mem: [w(0); RAND_SIZE_64], - a: w(0), b: w(0), c: w(0), -}; - -impl Isaac64Rng { - /// Create a 64-bit ISAAC random number generator using the - /// default fixed seed. - pub fn new_unseeded() -> Isaac64Rng { - let mut rng = EMPTY_64; - rng.init(false); - rng - } - - /// Initialises `self`. If `use_rsl` is true, then use the current value - /// of `rsl` as a seed, otherwise construct one algorithmically (not - /// randomly). - fn init(&mut self, use_rsl: bool) { - macro_rules! init { - ($var:ident) => ( - let mut $var = w(0x9e3779b97f4a7c13); - ) - } - init!(a); init!(b); init!(c); init!(d); - init!(e); init!(f); init!(g); init!(h); - - macro_rules! mix { - () => {{ - a=a-e; f=f^(h>>9); h=h+a; - b=b-f; g=g^(a<<9); a=a+b; - c=c-g; h=h^(b>>23); b=b+c; - d=d-h; a=a^(c<<15); c=c+d; - e=e-a; b=b^(d>>14); d=d+e; - f=f-b; c=c^(e<<20); e=e+f; - g=g-c; d=d^(f>>17); f=f+g; - h=h-d; e=e^(g<<14); g=g+h; - }} - } - - for _ in 0..4 { - mix!(); - } - - if use_rsl { - macro_rules! memloop { - ($arr:expr) => {{ - for i in (0..RAND_SIZE_64 / 8).map(|i| i * 8) { - a=a+$arr[i ]; b=b+$arr[i+1]; - c=c+$arr[i+2]; d=d+$arr[i+3]; - e=e+$arr[i+4]; f=f+$arr[i+5]; - g=g+$arr[i+6]; h=h+$arr[i+7]; - mix!(); - self.mem[i ]=a; self.mem[i+1]=b; - self.mem[i+2]=c; self.mem[i+3]=d; - self.mem[i+4]=e; self.mem[i+5]=f; - self.mem[i+6]=g; self.mem[i+7]=h; - } - }} - } - - memloop!(self.rsl); - memloop!(self.mem); - } else { - for i in (0..RAND_SIZE_64 / 8).map(|i| i * 8) { - mix!(); - self.mem[i ]=a; self.mem[i+1]=b; - self.mem[i+2]=c; self.mem[i+3]=d; - self.mem[i+4]=e; self.mem[i+5]=f; - self.mem[i+6]=g; self.mem[i+7]=h; - } - } - - self.isaac64(); - } - - /// Refills the output buffer (`self.rsl`) - fn isaac64(&mut self) { - self.c = self.c + w(1); - // abbreviations - let mut a = self.a; - let mut b = self.b + self.c; - const MIDPOINT: usize = RAND_SIZE_64 / 2; - const MP_VEC: [(usize, usize); 2] = [(0,MIDPOINT), (MIDPOINT, 0)]; - macro_rules! ind { - ($x:expr) => { - *self.mem.get_unchecked((($x >> 3usize).0 as usize) & (RAND_SIZE_64 - 1)) - } - } - - for &(mr_offset, m2_offset) in MP_VEC.iter() { - for base in (0..MIDPOINT / 4).map(|i| i * 4) { - - macro_rules! rngstepp { - ($j:expr, $shift:expr) => {{ - let base = base + $j; - let mix = a ^ (a << $shift); - let mix = if $j == 0 {!mix} else {mix}; - - unsafe { - let x = *self.mem.get_unchecked(base + mr_offset); - a = mix + *self.mem.get_unchecked(base + m2_offset); - let y = ind!(x) + a + b; - *self.mem.get_unchecked_mut(base + mr_offset) = y; - - b = ind!(y >> RAND_SIZE_64_LEN) + x; - *self.rsl.get_unchecked_mut(base + mr_offset) = b; - } - }} - } - - macro_rules! rngstepn { - ($j:expr, $shift:expr) => {{ - let base = base + $j; - let mix = a ^ (a >> $shift); - let mix = if $j == 0 {!mix} else {mix}; - - unsafe { - let x = *self.mem.get_unchecked(base + mr_offset); - a = mix + *self.mem.get_unchecked(base + m2_offset); - let y = ind!(x) + a + b; - *self.mem.get_unchecked_mut(base + mr_offset) = y; - - b = ind!(y >> RAND_SIZE_64_LEN) + x; - *self.rsl.get_unchecked_mut(base + mr_offset) = b; - } - }} - } - - rngstepp!(0, 21); - rngstepn!(1, 5); - rngstepp!(2, 12); - rngstepn!(3, 33); - } - } - - self.a = a; - self.b = b; - self.cnt = RAND_SIZE_64; - } -} - -// Cannot be derived because [u32; 256] does not implement Clone -impl Clone for Isaac64Rng { - fn clone(&self) -> Isaac64Rng { - *self - } -} - -impl Rng for Isaac64Rng { - // FIXME #7771: having next_u32 like this should be unnecessary - #[inline] - fn next_u32(&mut self) -> u32 { - self.next_u64() as u32 - } - - #[inline] - fn next_u64(&mut self) -> u64 { - if self.cnt == 0 { - // make some more numbers - self.isaac64(); - } - self.cnt -= 1; - - // See corresponding location in IsaacRng.next_u32 for - // explanation. - debug_assert!(self.cnt < RAND_SIZE_64); - self.rsl[(self.cnt % RAND_SIZE_64) as usize].0 - } -} - -impl<'a> SeedableRng<&'a [u64]> for Isaac64Rng { - fn reseed(&mut self, seed: &'a [u64]) { - // make the seed into [seed[0], seed[1], ..., seed[seed.len() - // - 1], 0, 0, ...], to fill rng.rsl. - let seed_iter = seed.iter().map(|&x| x).chain(repeat(0u64)); - - for (rsl_elem, seed_elem) in self.rsl.iter_mut().zip(seed_iter) { - *rsl_elem = w(seed_elem); - } - self.cnt = 0; - self.a = w(0); - self.b = w(0); - self.c = w(0); - - self.init(true); - } - - /// Create an ISAAC random number generator with a seed. This can - /// be any length, although the maximum number of elements used is - /// 256 and any more will be silently ignored. A generator - /// constructed with a given seed will generate the same sequence - /// of values as all other generators constructed with that seed. - fn from_seed(seed: &'a [u64]) -> Isaac64Rng { - let mut rng = EMPTY_64; - rng.reseed(seed); - rng - } -} - -impl Rand for Isaac64Rng { - fn rand(other: &mut R) -> Isaac64Rng { - let mut ret = EMPTY_64; - unsafe { - let ptr = ret.rsl.as_mut_ptr() as *mut u8; - - let slice = slice::from_raw_parts_mut(ptr, RAND_SIZE_64 * 8); - other.fill_bytes(slice); - } - ret.cnt = 0; - ret.a = w(0); - ret.b = w(0); - ret.c = w(0); - - ret.init(true); - return ret; - } -} - -impl fmt::Debug for Isaac64Rng { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Isaac64Rng {{}}") - } -} - -#[cfg(test)] -mod test { - use {Rng, SeedableRng}; - use super::{IsaacRng, Isaac64Rng}; - - #[test] - fn test_rng_32_rand_seeded() { - let s = ::test::rng().gen_iter::().take(256).collect::>(); - let mut ra: IsaacRng = SeedableRng::from_seed(&s[..]); - let mut rb: IsaacRng = SeedableRng::from_seed(&s[..]); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - #[test] - fn test_rng_64_rand_seeded() { - let s = ::test::rng().gen_iter::().take(256).collect::>(); - let mut ra: Isaac64Rng = SeedableRng::from_seed(&s[..]); - let mut rb: Isaac64Rng = SeedableRng::from_seed(&s[..]); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_rng_32_seeded() { - let seed: &[_] = &[1, 23, 456, 7890, 12345]; - let mut ra: IsaacRng = SeedableRng::from_seed(seed); - let mut rb: IsaacRng = SeedableRng::from_seed(seed); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - #[test] - fn test_rng_64_seeded() { - let seed: &[_] = &[1, 23, 456, 7890, 12345]; - let mut ra: Isaac64Rng = SeedableRng::from_seed(seed); - let mut rb: Isaac64Rng = SeedableRng::from_seed(seed); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_rng_32_reseed() { - let s = ::test::rng().gen_iter::().take(256).collect::>(); - let mut r: IsaacRng = SeedableRng::from_seed(&s[..]); - let string1: String = r.gen_ascii_chars().take(100).collect(); - - r.reseed(&s[..]); - - let string2: String = r.gen_ascii_chars().take(100).collect(); - assert_eq!(string1, string2); - } - #[test] - fn test_rng_64_reseed() { - let s = ::test::rng().gen_iter::().take(256).collect::>(); - let mut r: Isaac64Rng = SeedableRng::from_seed(&s[..]); - let string1: String = r.gen_ascii_chars().take(100).collect(); - - r.reseed(&s[..]); - - let string2: String = r.gen_ascii_chars().take(100).collect(); - assert_eq!(string1, string2); - } - - #[test] - fn test_rng_32_true_values() { - let seed: &[_] = &[1, 23, 456, 7890, 12345]; - let mut ra: IsaacRng = SeedableRng::from_seed(seed); - // Regression test that isaac is actually using the above vector - let v = (0..10).map(|_| ra.next_u32()).collect::>(); - assert_eq!(v, - vec!(2558573138, 873787463, 263499565, 2103644246, 3595684709, - 4203127393, 264982119, 2765226902, 2737944514, 3900253796)); - - let seed: &[_] = &[12345, 67890, 54321, 9876]; - let mut rb: IsaacRng = SeedableRng::from_seed(seed); - // skip forward to the 10000th number - for _ in 0..10000 { rb.next_u32(); } - - let v = (0..10).map(|_| rb.next_u32()).collect::>(); - assert_eq!(v, - vec!(3676831399, 3183332890, 2834741178, 3854698763, 2717568474, - 1576568959, 3507990155, 179069555, 141456972, 2478885421)); - } - #[test] - fn test_rng_64_true_values() { - let seed: &[_] = &[1, 23, 456, 7890, 12345]; - let mut ra: Isaac64Rng = SeedableRng::from_seed(seed); - // Regression test that isaac is actually using the above vector - let v = (0..10).map(|_| ra.next_u64()).collect::>(); - assert_eq!(v, - vec!(547121783600835980, 14377643087320773276, 17351601304698403469, - 1238879483818134882, 11952566807690396487, 13970131091560099343, - 4469761996653280935, 15552757044682284409, 6860251611068737823, - 13722198873481261842)); - - let seed: &[_] = &[12345, 67890, 54321, 9876]; - let mut rb: Isaac64Rng = SeedableRng::from_seed(seed); - // skip forward to the 10000th number - for _ in 0..10000 { rb.next_u64(); } - - let v = (0..10).map(|_| rb.next_u64()).collect::>(); - assert_eq!(v, - vec!(18143823860592706164, 8491801882678285927, 2699425367717515619, - 17196852593171130876, 2606123525235546165, 15790932315217671084, - 596345674630742204, 9947027391921273664, 11788097613744130851, - 10391409374914919106)); - } - - #[test] - fn test_rng_clone() { - let seed: &[_] = &[1, 23, 456, 7890, 12345]; - let mut rng: Isaac64Rng = SeedableRng::from_seed(seed); - let mut clone = rng.clone(); - for _ in 0..16 { - assert_eq!(rng.next_u64(), clone.next_u64()); - } - } -} diff --git a/Chapter03/rand/src/lib.rs b/Chapter03/rand/src/lib.rs deleted file mode 100644 index 955a3c8..0000000 --- a/Chapter03/rand/src/lib.rs +++ /dev/null @@ -1,1250 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Utilities for random number generation -//! -//! The key functions are `random()` and `Rng::gen()`. These are polymorphic and -//! so can be used to generate any type that implements `Rand`. Type inference -//! means that often a simple call to `rand::random()` or `rng.gen()` will -//! suffice, but sometimes an annotation is required, e.g. -//! `rand::random::()`. -//! -//! See the `distributions` submodule for sampling random numbers from -//! distributions like normal and exponential. -//! -//! # Usage -//! -//! This crate is [on crates.io](https://crates.io/crates/rand) and can be -//! used by adding `rand` to the dependencies in your project's `Cargo.toml`. -//! -//! ```toml -//! [dependencies] -//! rand = "0.3" -//! ``` -//! -//! and this to your crate root: -//! -//! ```rust -//! extern crate rand; -//! ``` -//! -//! # Thread-local RNG -//! -//! There is built-in support for a RNG associated with each thread stored -//! in thread-local storage. This RNG can be accessed via `thread_rng`, or -//! used implicitly via `random`. This RNG is normally randomly seeded -//! from an operating-system source of randomness, e.g. `/dev/urandom` on -//! Unix systems, and will automatically reseed itself from this source -//! after generating 32 KiB of random data. -//! -//! # Cryptographic security -//! -//! An application that requires an entropy source for cryptographic purposes -//! must use `OsRng`, which reads randomness from the source that the operating -//! system provides (e.g. `/dev/urandom` on Unixes or `CryptGenRandom()` on -//! Windows). -//! The other random number generators provided by this module are not suitable -//! for such purposes. -//! -//! *Note*: many Unix systems provide `/dev/random` as well as `/dev/urandom`. -//! This module uses `/dev/urandom` for the following reasons: -//! -//! - On Linux, `/dev/random` may block if entropy pool is empty; -//! `/dev/urandom` will not block. This does not mean that `/dev/random` -//! provides better output than `/dev/urandom`; the kernel internally runs a -//! cryptographically secure pseudorandom number generator (CSPRNG) based on -//! entropy pool for random number generation, so the "quality" of -//! `/dev/random` is not better than `/dev/urandom` in most cases. However, -//! this means that `/dev/urandom` can yield somewhat predictable randomness -//! if the entropy pool is very small, such as immediately after first -//! booting. Linux 3.17 added the `getrandom(2)` system call which solves -//! the issue: it blocks if entropy pool is not initialized yet, but it does -//! not block once initialized. `OsRng` tries to use `getrandom(2)` if -//! available, and use `/dev/urandom` fallback if not. If an application -//! does not have `getrandom` and likely to be run soon after first booting, -//! or on a system with very few entropy sources, one should consider using -//! `/dev/random` via `ReadRng`. -//! - On some systems (e.g. FreeBSD, OpenBSD and Mac OS X) there is no -//! difference between the two sources. (Also note that, on some systems -//! e.g. FreeBSD, both `/dev/random` and `/dev/urandom` may block once if -//! the CSPRNG has not seeded yet.) -//! -//! # Examples -//! -//! ```rust -//! use rand::Rng; -//! -//! let mut rng = rand::thread_rng(); -//! if rng.gen() { // random bool -//! println!("i32: {}, u32: {}", rng.gen::(), rng.gen::()) -//! } -//! ``` -//! -//! ```rust -//! let tuple = rand::random::<(f64, char)>(); -//! println!("{:?}", tuple) -//! ``` -//! -//! ## Monte Carlo estimation of π -//! -//! For this example, imagine we have a square with sides of length 2 and a unit -//! circle, both centered at the origin. Since the area of a unit circle is π, -//! we have: -//! -//! ```text -//! (area of unit circle) / (area of square) = π / 4 -//! ``` -//! -//! So if we sample many points randomly from the square, roughly π / 4 of them -//! should be inside the circle. -//! -//! We can use the above fact to estimate the value of π: pick many points in -//! the square at random, calculate the fraction that fall within the circle, -//! and multiply this fraction by 4. -//! -//! ``` -//! use rand::distributions::{IndependentSample, Range}; -//! -//! fn main() { -//! let between = Range::new(-1f64, 1.); -//! let mut rng = rand::thread_rng(); -//! -//! let total = 1_000_000; -//! let mut in_circle = 0; -//! -//! for _ in 0..total { -//! let a = between.ind_sample(&mut rng); -//! let b = between.ind_sample(&mut rng); -//! if a*a + b*b <= 1. { -//! in_circle += 1; -//! } -//! } -//! -//! // prints something close to 3.14159... -//! println!("{}", 4. * (in_circle as f64) / (total as f64)); -//! } -//! ``` -//! -//! ## Monty Hall Problem -//! -//! This is a simulation of the [Monty Hall Problem][]: -//! -//! > Suppose you're on a game show, and you're given the choice of three doors: -//! > Behind one door is a car; behind the others, goats. You pick a door, say -//! > No. 1, and the host, who knows what's behind the doors, opens another -//! > door, say No. 3, which has a goat. He then says to you, "Do you want to -//! > pick door No. 2?" Is it to your advantage to switch your choice? -//! -//! The rather unintuitive answer is that you will have a 2/3 chance of winning -//! if you switch and a 1/3 chance of winning if you don't, so it's better to -//! switch. -//! -//! This program will simulate the game show and with large enough simulation -//! steps it will indeed confirm that it is better to switch. -//! -//! [Monty Hall Problem]: http://en.wikipedia.org/wiki/Monty_Hall_problem -//! -//! ``` -//! use rand::Rng; -//! use rand::distributions::{IndependentSample, Range}; -//! -//! struct SimulationResult { -//! win: bool, -//! switch: bool, -//! } -//! -//! // Run a single simulation of the Monty Hall problem. -//! fn simulate(random_door: &Range, rng: &mut R) -//! -> SimulationResult { -//! let car = random_door.ind_sample(rng); -//! -//! // This is our initial choice -//! let mut choice = random_door.ind_sample(rng); -//! -//! // The game host opens a door -//! let open = game_host_open(car, choice, rng); -//! -//! // Shall we switch? -//! let switch = rng.gen(); -//! if switch { -//! choice = switch_door(choice, open); -//! } -//! -//! SimulationResult { win: choice == car, switch: switch } -//! } -//! -//! // Returns the door the game host opens given our choice and knowledge of -//! // where the car is. The game host will never open the door with the car. -//! fn game_host_open(car: u32, choice: u32, rng: &mut R) -> u32 { -//! let choices = free_doors(&[car, choice]); -//! rand::sample(rng, choices.into_iter(), 1)[0] -//! } -//! -//! // Returns the door we switch to, given our current choice and -//! // the open door. There will only be one valid door. -//! fn switch_door(choice: u32, open: u32) -> u32 { -//! free_doors(&[choice, open])[0] -//! } -//! -//! fn free_doors(blocked: &[u32]) -> Vec { -//! (0..3).filter(|x| !blocked.contains(x)).collect() -//! } -//! -//! fn main() { -//! // The estimation will be more accurate with more simulations -//! let num_simulations = 10000; -//! -//! let mut rng = rand::thread_rng(); -//! let random_door = Range::new(0, 3); -//! -//! let (mut switch_wins, mut switch_losses) = (0, 0); -//! let (mut keep_wins, mut keep_losses) = (0, 0); -//! -//! println!("Running {} simulations...", num_simulations); -//! for _ in 0..num_simulations { -//! let result = simulate(&random_door, &mut rng); -//! -//! match (result.win, result.switch) { -//! (true, true) => switch_wins += 1, -//! (true, false) => keep_wins += 1, -//! (false, true) => switch_losses += 1, -//! (false, false) => keep_losses += 1, -//! } -//! } -//! -//! let total_switches = switch_wins + switch_losses; -//! let total_keeps = keep_wins + keep_losses; -//! -//! println!("Switched door {} times with {} wins and {} losses", -//! total_switches, switch_wins, switch_losses); -//! -//! println!("Kept our choice {} times with {} wins and {} losses", -//! total_keeps, keep_wins, keep_losses); -//! -//! // With a large number of simulations, the values should converge to -//! // 0.667 and 0.333 respectively. -//! println!("Estimated chance to win if we switch: {}", -//! switch_wins as f32 / total_switches as f32); -//! println!("Estimated chance to win if we don't: {}", -//! keep_wins as f32 / total_keeps as f32); -//! } -//! ``` - -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/rand/")] - -#![deny(missing_debug_implementations)] - -#[cfg(test)] #[macro_use] extern crate log; - - -use std::cell::RefCell; -use std::marker; -use std::mem; -use std::io; -use std::rc::Rc; -use std::num::Wrapping as w; - -pub use os::OsRng; - -pub use isaac::{IsaacRng, Isaac64Rng}; -pub use chacha::ChaChaRng; - -#[cfg(target_pointer_width = "32")] -use IsaacRng as IsaacWordRng; -#[cfg(target_pointer_width = "64")] -use Isaac64Rng as IsaacWordRng; - -use distributions::{Range, IndependentSample}; -use distributions::range::SampleRange; - -pub mod distributions; -pub mod isaac; -pub mod chacha; -pub mod reseeding; -mod rand_impls; -pub mod os; -pub mod read; - -#[allow(bad_style)] -type w64 = w; -#[allow(bad_style)] -type w32 = w; - -/// A type that can be randomly generated using an `Rng`. -pub trait Rand : Sized { - /// Generates a random instance of this type using the specified source of - /// randomness. - fn rand(rng: &mut R) -> Self; -} - -/// A random number generator. -pub trait Rng { - /// Return the next random u32. - /// - /// This rarely needs to be called directly, prefer `r.gen()` to - /// `r.next_u32()`. - // FIXME #7771: Should be implemented in terms of next_u64 - fn next_u32(&mut self) -> u32; - - /// Return the next random u64. - /// - /// By default this is implemented in terms of `next_u32`. An - /// implementation of this trait must provide at least one of - /// these two methods. Similarly to `next_u32`, this rarely needs - /// to be called directly, prefer `r.gen()` to `r.next_u64()`. - fn next_u64(&mut self) -> u64 { - ((self.next_u32() as u64) << 32) | (self.next_u32() as u64) - } - - /// Return the next random f32 selected from the half-open - /// interval `[0, 1)`. - /// - /// This uses a technique described by Saito and Matsumoto at - /// MCQMC'08. Given that the IEEE floating point numbers are - /// uniformly distributed over [1,2), we generate a number in - /// this range and then offset it onto the range [0,1). Our - /// choice of bits (masking v. shifting) is arbitrary and - /// should be immaterial for high quality generators. For low - /// quality generators (ex. LCG), prefer bitshifting due to - /// correlation between sequential low order bits. - /// - /// See: - /// A PRNG specialized in double precision floating point numbers using - /// an affine transition - /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/dSFMT.pdf - /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-slide-e.pdf - /// - /// By default this is implemented in terms of `next_u32`, but a - /// random number generator which can generate numbers satisfying - /// the requirements directly can overload this for performance. - /// It is required that the return value lies in `[0, 1)`. - /// - /// See `Closed01` for the closed interval `[0,1]`, and - /// `Open01` for the open interval `(0,1)`. - fn next_f32(&mut self) -> f32 { - const UPPER_MASK: u32 = 0x3F800000; - const LOWER_MASK: u32 = 0x7FFFFF; - let tmp = UPPER_MASK | (self.next_u32() & LOWER_MASK); - let result: f32 = unsafe { mem::transmute(tmp) }; - result - 1.0 - } - - /// Return the next random f64 selected from the half-open - /// interval `[0, 1)`. - /// - /// By default this is implemented in terms of `next_u64`, but a - /// random number generator which can generate numbers satisfying - /// the requirements directly can overload this for performance. - /// It is required that the return value lies in `[0, 1)`. - /// - /// See `Closed01` for the closed interval `[0,1]`, and - /// `Open01` for the open interval `(0,1)`. - fn next_f64(&mut self) -> f64 { - const UPPER_MASK: u64 = 0x3FF0000000000000; - const LOWER_MASK: u64 = 0xFFFFFFFFFFFFF; - let tmp = UPPER_MASK | (self.next_u64() & LOWER_MASK); - let result: f64 = unsafe { mem::transmute(tmp) }; - result - 1.0 - } - - /// Fill `dest` with random data. - /// - /// This has a default implementation in terms of `next_u64` and - /// `next_u32`, but should be overridden by implementations that - /// offer a more efficient solution than just calling those - /// methods repeatedly. - /// - /// This method does *not* have a requirement to bear any fixed - /// relationship to the other methods, for example, it does *not* - /// have to result in the same output as progressively filling - /// `dest` with `self.gen::()`, and any such behaviour should - /// not be relied upon. - /// - /// This method should guarantee that `dest` is entirely filled - /// with new data, and may panic if this is impossible - /// (e.g. reading past the end of a file that is being used as the - /// source of randomness). - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let mut v = [0u8; 13579]; - /// thread_rng().fill_bytes(&mut v); - /// println!("{:?}", &v[..]); - /// ``` - fn fill_bytes(&mut self, dest: &mut [u8]) { - // this could, in theory, be done by transmuting dest to a - // [u64], but this is (1) likely to be undefined behaviour for - // LLVM, (2) has to be very careful about alignment concerns, - // (3) adds more `unsafe` that needs to be checked, (4) - // probably doesn't give much performance gain if - // optimisations are on. - let mut count = 0; - let mut num = 0; - for byte in dest.iter_mut() { - if count == 0 { - // we could micro-optimise here by generating a u32 if - // we only need a few more bytes to fill the vector - // (i.e. at most 4). - num = self.next_u64(); - count = 8; - } - - *byte = (num & 0xff) as u8; - num >>= 8; - count -= 1; - } - } - - /// Return a random value of a `Rand` type. - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let mut rng = thread_rng(); - /// let x: u32 = rng.gen(); - /// println!("{}", x); - /// println!("{:?}", rng.gen::<(f64, bool)>()); - /// ``` - #[inline(always)] - fn gen(&mut self) -> T where Self: Sized { - Rand::rand(self) - } - - /// Return an iterator that will yield an infinite number of randomly - /// generated items. - /// - /// # Example - /// - /// ``` - /// use rand::{thread_rng, Rng}; - /// - /// let mut rng = thread_rng(); - /// let x = rng.gen_iter::().take(10).collect::>(); - /// println!("{:?}", x); - /// println!("{:?}", rng.gen_iter::<(f64, bool)>().take(5) - /// .collect::>()); - /// ``` - fn gen_iter<'a, T: Rand>(&'a mut self) -> Generator<'a, T, Self> where Self: Sized { - Generator { rng: self, _marker: marker::PhantomData } - } - - /// Generate a random value in the range [`low`, `high`). - /// - /// This is a convenience wrapper around - /// `distributions::Range`. If this function will be called - /// repeatedly with the same arguments, one should use `Range`, as - /// that will amortize the computations that allow for perfect - /// uniformity, as they only happen on initialization. - /// - /// # Panics - /// - /// Panics if `low >= high`. - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let mut rng = thread_rng(); - /// let n: u32 = rng.gen_range(0, 10); - /// println!("{}", n); - /// let m: f64 = rng.gen_range(-40.0f64, 1.3e5f64); - /// println!("{}", m); - /// ``` - fn gen_range(&mut self, low: T, high: T) -> T where Self: Sized { - assert!(low < high, "Rng.gen_range called with low >= high"); - Range::new(low, high).ind_sample(self) - } - - /// Return a bool with a 1 in n chance of true - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let mut rng = thread_rng(); - /// println!("{}", rng.gen_weighted_bool(3)); - /// ``` - fn gen_weighted_bool(&mut self, n: u32) -> bool where Self: Sized { - n <= 1 || self.gen_range(0, n) == 0 - } - - /// Return an iterator of random characters from the set A-Z,a-z,0-9. - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let s: String = thread_rng().gen_ascii_chars().take(10).collect(); - /// println!("{}", s); - /// ``` - fn gen_ascii_chars<'a>(&'a mut self) -> AsciiGenerator<'a, Self> where Self: Sized { - AsciiGenerator { rng: self } - } - - /// Return a random element from `values`. - /// - /// Return `None` if `values` is empty. - /// - /// # Example - /// - /// ``` - /// use rand::{thread_rng, Rng}; - /// - /// let choices = [1, 2, 4, 8, 16, 32]; - /// let mut rng = thread_rng(); - /// println!("{:?}", rng.choose(&choices)); - /// assert_eq!(rng.choose(&choices[..0]), None); - /// ``` - fn choose<'a, T>(&mut self, values: &'a [T]) -> Option<&'a T> where Self: Sized { - if values.is_empty() { - None - } else { - Some(&values[self.gen_range(0, values.len())]) - } - } - - /// Return a mutable pointer to a random element from `values`. - /// - /// Return `None` if `values` is empty. - fn choose_mut<'a, T>(&mut self, values: &'a mut [T]) -> Option<&'a mut T> where Self: Sized { - if values.is_empty() { - None - } else { - let len = values.len(); - Some(&mut values[self.gen_range(0, len)]) - } - } - - /// Shuffle a mutable slice in place. - /// - /// # Example - /// - /// ```rust - /// use rand::{thread_rng, Rng}; - /// - /// let mut rng = thread_rng(); - /// let mut y = [1, 2, 3]; - /// rng.shuffle(&mut y); - /// println!("{:?}", y); - /// rng.shuffle(&mut y); - /// println!("{:?}", y); - /// ``` - fn shuffle(&mut self, values: &mut [T]) where Self: Sized { - let mut i = values.len(); - while i >= 2 { - // invariant: elements with index >= i have been locked in place. - i -= 1; - // lock element i in place. - values.swap(i, self.gen_range(0, i + 1)); - } - } -} - -impl<'a, R: ?Sized> Rng for &'a mut R where R: Rng { - fn next_u32(&mut self) -> u32 { - (**self).next_u32() - } - - fn next_u64(&mut self) -> u64 { - (**self).next_u64() - } - - fn next_f32(&mut self) -> f32 { - (**self).next_f32() - } - - fn next_f64(&mut self) -> f64 { - (**self).next_f64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - (**self).fill_bytes(dest) - } -} - -impl Rng for Box where R: Rng { - fn next_u32(&mut self) -> u32 { - (**self).next_u32() - } - - fn next_u64(&mut self) -> u64 { - (**self).next_u64() - } - - fn next_f32(&mut self) -> f32 { - (**self).next_f32() - } - - fn next_f64(&mut self) -> f64 { - (**self).next_f64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - (**self).fill_bytes(dest) - } -} - -/// Iterator which will generate a stream of random items. -/// -/// This iterator is created via the [`gen_iter`] method on [`Rng`]. -/// -/// [`gen_iter`]: trait.Rng.html#method.gen_iter -/// [`Rng`]: trait.Rng.html -#[derive(Debug)] -pub struct Generator<'a, T, R:'a> { - rng: &'a mut R, - _marker: marker::PhantomData T>, -} - -impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> { - type Item = T; - - fn next(&mut self) -> Option { - Some(self.rng.gen()) - } -} - -/// Iterator which will continuously generate random ascii characters. -/// -/// This iterator is created via the [`gen_ascii_chars`] method on [`Rng`]. -/// -/// [`gen_ascii_chars`]: trait.Rng.html#method.gen_ascii_chars -/// [`Rng`]: trait.Rng.html -#[derive(Debug)] -pub struct AsciiGenerator<'a, R:'a> { - rng: &'a mut R, -} - -impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> { - type Item = char; - - fn next(&mut self) -> Option { - const GEN_ASCII_STR_CHARSET: &'static [u8] = - b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ - abcdefghijklmnopqrstuvwxyz\ - 0123456789"; - Some(*self.rng.choose(GEN_ASCII_STR_CHARSET).unwrap() as char) - } -} - -/// A random number generator that can be explicitly seeded to produce -/// the same stream of randomness multiple times. -pub trait SeedableRng: Rng { - /// Reseed an RNG with the given seed. - /// - /// # Example - /// - /// ```rust - /// use rand::{Rng, SeedableRng, StdRng}; - /// - /// let seed: &[_] = &[1, 2, 3, 4]; - /// let mut rng: StdRng = SeedableRng::from_seed(seed); - /// println!("{}", rng.gen::()); - /// rng.reseed(&[5, 6, 7, 8]); - /// println!("{}", rng.gen::()); - /// ``` - fn reseed(&mut self, Seed); - - /// Create a new RNG with the given seed. - /// - /// # Example - /// - /// ```rust - /// use rand::{Rng, SeedableRng, StdRng}; - /// - /// let seed: &[_] = &[1, 2, 3, 4]; - /// let mut rng: StdRng = SeedableRng::from_seed(seed); - /// println!("{}", rng.gen::()); - /// ``` - fn from_seed(seed: Seed) -> Self; -} - -/// An Xorshift[1] random number -/// generator. -/// -/// The Xorshift algorithm is not suitable for cryptographic purposes -/// but is very fast. If you do not know for sure that it fits your -/// requirements, use a more secure one such as `IsaacRng` or `OsRng`. -/// -/// [1]: Marsaglia, George (July 2003). ["Xorshift -/// RNGs"](http://www.jstatsoft.org/v08/i14/paper). *Journal of -/// Statistical Software*. Vol. 8 (Issue 14). -#[allow(missing_copy_implementations)] -#[derive(Clone, Debug)] -pub struct XorShiftRng { - x: w32, - y: w32, - z: w32, - w: w32, -} - -impl XorShiftRng { - /// Creates a new XorShiftRng instance which is not seeded. - /// - /// The initial values of this RNG are constants, so all generators created - /// by this function will yield the same stream of random numbers. It is - /// highly recommended that this is created through `SeedableRng` instead of - /// this function - pub fn new_unseeded() -> XorShiftRng { - XorShiftRng { - x: w(0x193a6754), - y: w(0xa8a7d469), - z: w(0x97830e05), - w: w(0x113ba7bb), - } - } -} - -impl Rng for XorShiftRng { - #[inline] - fn next_u32(&mut self) -> u32 { - let x = self.x; - let t = x ^ (x << 11); - self.x = self.y; - self.y = self.z; - self.z = self.w; - let w_ = self.w; - self.w = w_ ^ (w_ >> 19) ^ (t ^ (t >> 8)); - self.w.0 - } -} - -impl SeedableRng<[u32; 4]> for XorShiftRng { - /// Reseed an XorShiftRng. This will panic if `seed` is entirely 0. - fn reseed(&mut self, seed: [u32; 4]) { - assert!(!seed.iter().all(|&x| x == 0), - "XorShiftRng.reseed called with an all zero seed."); - - self.x = w(seed[0]); - self.y = w(seed[1]); - self.z = w(seed[2]); - self.w = w(seed[3]); - } - - /// Create a new XorShiftRng. This will panic if `seed` is entirely 0. - fn from_seed(seed: [u32; 4]) -> XorShiftRng { - assert!(!seed.iter().all(|&x| x == 0), - "XorShiftRng::from_seed called with an all zero seed."); - - XorShiftRng { - x: w(seed[0]), - y: w(seed[1]), - z: w(seed[2]), - w: w(seed[3]), - } - } -} - -impl Rand for XorShiftRng { - fn rand(rng: &mut R) -> XorShiftRng { - let mut tuple: (u32, u32, u32, u32) = rng.gen(); - while tuple == (0, 0, 0, 0) { - tuple = rng.gen(); - } - let (x, y, z, w_) = tuple; - XorShiftRng { x: w(x), y: w(y), z: w(z), w: w(w_) } - } -} - -/// A wrapper for generating floating point numbers uniformly in the -/// open interval `(0,1)` (not including either endpoint). -/// -/// Use `Closed01` for the closed interval `[0,1]`, and the default -/// `Rand` implementation for `f32` and `f64` for the half-open -/// `[0,1)`. -/// -/// # Example -/// ```rust -/// use rand::{random, Open01}; -/// -/// let Open01(val) = random::>(); -/// println!("f32 from (0,1): {}", val); -/// ``` -#[derive(Debug)] -pub struct Open01(pub F); - -/// A wrapper for generating floating point numbers uniformly in the -/// closed interval `[0,1]` (including both endpoints). -/// -/// Use `Open01` for the closed interval `(0,1)`, and the default -/// `Rand` implementation of `f32` and `f64` for the half-open -/// `[0,1)`. -/// -/// # Example -/// -/// ```rust -/// use rand::{random, Closed01}; -/// -/// let Closed01(val) = random::>(); -/// println!("f32 from [0,1]: {}", val); -/// ``` -#[derive(Debug)] -pub struct Closed01(pub F); - -/// The standard RNG. This is designed to be efficient on the current -/// platform. -#[derive(Copy, Clone, Debug)] -pub struct StdRng { - rng: IsaacWordRng, -} - -impl StdRng { - /// Create a randomly seeded instance of `StdRng`. - /// - /// This is a very expensive operation as it has to read - /// randomness from the operating system and use this in an - /// expensive seeding operation. If one is only generating a small - /// number of random numbers, or doesn't need the utmost speed for - /// generating each number, `thread_rng` and/or `random` may be more - /// appropriate. - /// - /// Reading the randomness from the OS may fail, and any error is - /// propagated via the `io::Result` return value. - pub fn new() -> io::Result { - OsRng::new().map(|mut r| StdRng { rng: r.gen() }) - } -} - -impl Rng for StdRng { - #[inline] - fn next_u32(&mut self) -> u32 { - self.rng.next_u32() - } - - #[inline] - fn next_u64(&mut self) -> u64 { - self.rng.next_u64() - } -} - -impl<'a> SeedableRng<&'a [usize]> for StdRng { - fn reseed(&mut self, seed: &'a [usize]) { - // the internal RNG can just be seeded from the above - // randomness. - self.rng.reseed(unsafe {mem::transmute(seed)}) - } - - fn from_seed(seed: &'a [usize]) -> StdRng { - StdRng { rng: SeedableRng::from_seed(unsafe {mem::transmute(seed)}) } - } -} - -/// Create a weak random number generator with a default algorithm and seed. -/// -/// It returns the fastest `Rng` algorithm currently available in Rust without -/// consideration for cryptography or security. If you require a specifically -/// seeded `Rng` for consistency over time you should pick one algorithm and -/// create the `Rng` yourself. -/// -/// This will read randomness from the operating system to seed the -/// generator. -pub fn weak_rng() -> XorShiftRng { - match OsRng::new() { - Ok(mut r) => r.gen(), - Err(e) => panic!("weak_rng: failed to create seeded RNG: {:?}", e) - } -} - -/// Controls how the thread-local RNG is reseeded. -#[derive(Debug)] -struct ThreadRngReseeder; - -impl reseeding::Reseeder for ThreadRngReseeder { - fn reseed(&mut self, rng: &mut StdRng) { - *rng = match StdRng::new() { - Ok(r) => r, - Err(e) => panic!("could not reseed thread_rng: {}", e) - } - } -} -const THREAD_RNG_RESEED_THRESHOLD: u64 = 32_768; -type ThreadRngInner = reseeding::ReseedingRng; - -/// The thread-local RNG. -#[derive(Clone, Debug)] -pub struct ThreadRng { - rng: Rc>, -} - -/// Retrieve the lazily-initialized thread-local random number -/// generator, seeded by the system. Intended to be used in method -/// chaining style, e.g. `thread_rng().gen::()`. -/// -/// The RNG provided will reseed itself from the operating system -/// after generating a certain amount of randomness. -/// -/// The internal RNG used is platform and architecture dependent, even -/// if the operating system random number generator is rigged to give -/// the same sequence always. If absolute consistency is required, -/// explicitly select an RNG, e.g. `IsaacRng` or `Isaac64Rng`. -pub fn thread_rng() -> ThreadRng { - // used to make space in TLS for a random number generator - thread_local!(static THREAD_RNG_KEY: Rc> = { - let r = match StdRng::new() { - Ok(r) => r, - Err(e) => panic!("could not initialize thread_rng: {}", e) - }; - let rng = reseeding::ReseedingRng::new(r, - THREAD_RNG_RESEED_THRESHOLD, - ThreadRngReseeder); - Rc::new(RefCell::new(rng)) - }); - - ThreadRng { rng: THREAD_RNG_KEY.with(|t| t.clone()) } -} - -impl Rng for ThreadRng { - fn next_u32(&mut self) -> u32 { - self.rng.borrow_mut().next_u32() - } - - fn next_u64(&mut self) -> u64 { - self.rng.borrow_mut().next_u64() - } - - #[inline] - fn fill_bytes(&mut self, bytes: &mut [u8]) { - self.rng.borrow_mut().fill_bytes(bytes) - } -} - -/// Generates a random value using the thread-local random number generator. -/// -/// `random()` can generate various types of random things, and so may require -/// type hinting to generate the specific type you want. -/// -/// This function uses the thread local random number generator. This means -/// that if you're calling `random()` in a loop, caching the generator can -/// increase performance. An example is shown below. -/// -/// # Examples -/// -/// ``` -/// let x = rand::random::(); -/// println!("{}", x); -/// -/// let y = rand::random::(); -/// println!("{}", y); -/// -/// if rand::random() { // generates a boolean -/// println!("Better lucky than good!"); -/// } -/// ``` -/// -/// Caching the thread local random number generator: -/// -/// ``` -/// use rand::Rng; -/// -/// let mut v = vec![1, 2, 3]; -/// -/// for x in v.iter_mut() { -/// *x = rand::random() -/// } -/// -/// // would be faster as -/// -/// let mut rng = rand::thread_rng(); -/// -/// for x in v.iter_mut() { -/// *x = rng.gen(); -/// } -/// ``` -#[inline] -pub fn random() -> T { - thread_rng().gen() -} - -/// Randomly sample up to `amount` elements from an iterator. -/// -/// # Example -/// -/// ```rust -/// use rand::{thread_rng, sample}; -/// -/// let mut rng = thread_rng(); -/// let sample = sample(&mut rng, 1..100, 5); -/// println!("{:?}", sample); -/// ``` -pub fn sample(rng: &mut R, iterable: I, amount: usize) -> Vec - where I: IntoIterator, - R: Rng, -{ - let mut iter = iterable.into_iter(); - let mut reservoir: Vec = iter.by_ref().take(amount).collect(); - // continue unless the iterator was exhausted - if reservoir.len() == amount { - for (i, elem) in iter.enumerate() { - let k = rng.gen_range(0, i + 1 + amount); - if let Some(spot) = reservoir.get_mut(k) { - *spot = elem; - } - } - } - reservoir -} - -#[cfg(test)] -mod test { - use super::{Rng, thread_rng, random, SeedableRng, StdRng, sample}; - use std::iter::repeat; - - pub struct MyRng { inner: R } - - impl Rng for MyRng { - fn next_u32(&mut self) -> u32 { - fn next(t: &mut T) -> u32 { - t.next_u32() - } - next(&mut self.inner) - } - } - - pub fn rng() -> MyRng<::ThreadRng> { - MyRng { inner: ::thread_rng() } - } - - struct ConstRng { i: u64 } - impl Rng for ConstRng { - fn next_u32(&mut self) -> u32 { self.i as u32 } - fn next_u64(&mut self) -> u64 { self.i } - - // no fill_bytes on purpose - } - - pub fn iter_eq(i: I, j: J) -> bool - where I: IntoIterator, - J: IntoIterator, - I::Item: Eq - { - // make sure the iterators have equal length - let mut i = i.into_iter(); - let mut j = j.into_iter(); - loop { - match (i.next(), j.next()) { - (Some(ref ei), Some(ref ej)) if ei == ej => { } - (None, None) => return true, - _ => return false, - } - } - } - - #[test] - fn test_fill_bytes_default() { - let mut r = ConstRng { i: 0x11_22_33_44_55_66_77_88 }; - - // check every remainder mod 8, both in small and big vectors. - let lengths = [0, 1, 2, 3, 4, 5, 6, 7, - 80, 81, 82, 83, 84, 85, 86, 87]; - for &n in lengths.iter() { - let mut v = repeat(0u8).take(n).collect::>(); - r.fill_bytes(&mut v); - - // use this to get nicer error messages. - for (i, &byte) in v.iter().enumerate() { - if byte == 0 { - panic!("byte {} of {} is zero", i, n) - } - } - } - } - - #[test] - fn test_gen_range() { - let mut r = thread_rng(); - for _ in 0..1000 { - let a = r.gen_range(-3, 42); - assert!(a >= -3 && a < 42); - assert_eq!(r.gen_range(0, 1), 0); - assert_eq!(r.gen_range(-12, -11), -12); - } - - for _ in 0..1000 { - let a = r.gen_range(10, 42); - assert!(a >= 10 && a < 42); - assert_eq!(r.gen_range(0, 1), 0); - assert_eq!(r.gen_range(3_000_000, 3_000_001), 3_000_000); - } - - } - - #[test] - #[should_panic] - fn test_gen_range_panic_int() { - let mut r = thread_rng(); - r.gen_range(5, -2); - } - - #[test] - #[should_panic] - fn test_gen_range_panic_usize() { - let mut r = thread_rng(); - r.gen_range(5, 2); - } - - #[test] - fn test_gen_f64() { - let mut r = thread_rng(); - let a = r.gen::(); - let b = r.gen::(); - debug!("{:?}", (a, b)); - } - - #[test] - fn test_gen_weighted_bool() { - let mut r = thread_rng(); - assert_eq!(r.gen_weighted_bool(0), true); - assert_eq!(r.gen_weighted_bool(1), true); - } - - #[test] - fn test_gen_ascii_str() { - let mut r = thread_rng(); - assert_eq!(r.gen_ascii_chars().take(0).count(), 0); - assert_eq!(r.gen_ascii_chars().take(10).count(), 10); - assert_eq!(r.gen_ascii_chars().take(16).count(), 16); - } - - #[test] - fn test_gen_vec() { - let mut r = thread_rng(); - assert_eq!(r.gen_iter::().take(0).count(), 0); - assert_eq!(r.gen_iter::().take(10).count(), 10); - assert_eq!(r.gen_iter::().take(16).count(), 16); - } - - #[test] - fn test_choose() { - let mut r = thread_rng(); - assert_eq!(r.choose(&[1, 1, 1]).map(|&x|x), Some(1)); - - let v: &[isize] = &[]; - assert_eq!(r.choose(v), None); - } - - #[test] - fn test_shuffle() { - let mut r = thread_rng(); - let empty: &mut [isize] = &mut []; - r.shuffle(empty); - let mut one = [1]; - r.shuffle(&mut one); - let b: &[_] = &[1]; - assert_eq!(one, b); - - let mut two = [1, 2]; - r.shuffle(&mut two); - assert!(two == [1, 2] || two == [2, 1]); - - let mut x = [1, 1, 1]; - r.shuffle(&mut x); - let b: &[_] = &[1, 1, 1]; - assert_eq!(x, b); - } - - #[test] - fn test_thread_rng() { - let mut r = thread_rng(); - r.gen::(); - let mut v = [1, 1, 1]; - r.shuffle(&mut v); - let b: &[_] = &[1, 1, 1]; - assert_eq!(v, b); - assert_eq!(r.gen_range(0, 1), 0); - } - - #[test] - fn test_rng_trait_object() { - let mut rng = thread_rng(); - { - let mut r = &mut rng as &mut Rng; - r.next_u32(); - (&mut r).gen::(); - let mut v = [1, 1, 1]; - (&mut r).shuffle(&mut v); - let b: &[_] = &[1, 1, 1]; - assert_eq!(v, b); - assert_eq!((&mut r).gen_range(0, 1), 0); - } - { - let mut r = Box::new(rng) as Box; - r.next_u32(); - r.gen::(); - let mut v = [1, 1, 1]; - r.shuffle(&mut v); - let b: &[_] = &[1, 1, 1]; - assert_eq!(v, b); - assert_eq!(r.gen_range(0, 1), 0); - } - } - - #[test] - fn test_random() { - // not sure how to test this aside from just getting some values - let _n : usize = random(); - let _f : f32 = random(); - let _o : Option> = random(); - let _many : ((), - (usize, - isize, - Option<(u32, (bool,))>), - (u8, i8, u16, i16, u32, i32, u64, i64), - (f32, (f64, (f64,)))) = random(); - } - - #[test] - fn test_sample() { - let min_val = 1; - let max_val = 100; - - let mut r = thread_rng(); - let vals = (min_val..max_val).collect::>(); - let small_sample = sample(&mut r, vals.iter(), 5); - let large_sample = sample(&mut r, vals.iter(), vals.len() + 5); - - assert_eq!(small_sample.len(), 5); - assert_eq!(large_sample.len(), vals.len()); - - assert!(small_sample.iter().all(|e| { - **e >= min_val && **e <= max_val - })); - } - - #[test] - fn test_std_rng_seeded() { - let s = thread_rng().gen_iter::().take(256).collect::>(); - let mut ra: StdRng = SeedableRng::from_seed(&s[..]); - let mut rb: StdRng = SeedableRng::from_seed(&s[..]); - assert!(iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_std_rng_reseed() { - let s = thread_rng().gen_iter::().take(256).collect::>(); - let mut r: StdRng = SeedableRng::from_seed(&s[..]); - let string1 = r.gen_ascii_chars().take(100).collect::(); - - r.reseed(&s); - - let string2 = r.gen_ascii_chars().take(100).collect::(); - assert_eq!(string1, string2); - } -} diff --git a/Chapter03/rand/src/os.rs b/Chapter03/rand/src/os.rs deleted file mode 100644 index acb112c..0000000 --- a/Chapter03/rand/src/os.rs +++ /dev/null @@ -1,596 +0,0 @@ -// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Interfaces to the operating system provided random number -//! generators. - -use std::{io, mem, fmt}; -use Rng; - -/// A random number generator that retrieves randomness straight from -/// the operating system. Platform sources: -/// -/// - Unix-like systems (Linux, Android, Mac OSX): read directly from -/// `/dev/urandom`, or from `getrandom(2)` system call if available. -/// - OpenBSD: calls `getentropy(2)` -/// - FreeBSD: uses the `kern.arandom` `sysctl(2)` mib -/// - Windows: calls `CryptGenRandom`, using the default cryptographic -/// service provider with the `PROV_RSA_FULL` type. -/// - iOS: calls SecRandomCopyBytes as /dev/(u)random is sandboxed. -/// - PNaCl: calls into the `nacl-irt-random-0.1` IRT interface. -/// -/// This does not block. -pub struct OsRng(imp::OsRng); - -impl OsRng { - /// Create a new `OsRng`. - pub fn new() -> io::Result { - imp::OsRng::new().map(OsRng) - } -} - -impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { self.0.next_u32() } - fn next_u64(&mut self) -> u64 { self.0.next_u64() } - fn fill_bytes(&mut self, v: &mut [u8]) { self.0.fill_bytes(v) } -} - -impl fmt::Debug for OsRng { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "OsRng {{}}") - } -} - -fn next_u32(mut fill_buf: &mut FnMut(&mut [u8])) -> u32 { - let mut buf: [u8; 4] = [0; 4]; - fill_buf(&mut buf); - unsafe { mem::transmute::<[u8; 4], u32>(buf) } -} - -fn next_u64(mut fill_buf: &mut FnMut(&mut [u8])) -> u64 { - let mut buf: [u8; 8] = [0; 8]; - fill_buf(&mut buf); - unsafe { mem::transmute::<[u8; 8], u64>(buf) } -} - -#[cfg(all(unix, not(target_os = "ios"), - not(target_os = "nacl"), - not(target_os = "freebsd"), - not(target_os = "openbsd"), - not(target_os = "redox")))] -mod imp { - extern crate libc; - - use super::{next_u32, next_u64}; - use self::OsRngInner::*; - - use std::io; - use std::fs::File; - use Rng; - use read::ReadRng; - - #[cfg(all(target_os = "linux", - any(target_arch = "x86_64", - target_arch = "x86", - target_arch = "arm", - target_arch = "aarch64", - target_arch = "powerpc")))] - fn getrandom(buf: &mut [u8]) -> libc::c_long { - extern "C" { - fn syscall(number: libc::c_long, ...) -> libc::c_long; - } - - #[cfg(target_arch = "x86_64")] - const NR_GETRANDOM: libc::c_long = 318; - #[cfg(target_arch = "x86")] - const NR_GETRANDOM: libc::c_long = 355; - #[cfg(target_arch = "arm")] - const NR_GETRANDOM: libc::c_long = 384; - #[cfg(target_arch = "aarch64")] - const NR_GETRANDOM: libc::c_long = 278; - #[cfg(target_arch = "powerpc")] - const NR_GETRANDOM: libc::c_long = 384; - - unsafe { - syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0) - } - } - - #[cfg(not(all(target_os = "linux", - any(target_arch = "x86_64", - target_arch = "x86", - target_arch = "arm", - target_arch = "aarch64", - target_arch = "powerpc"))))] - fn getrandom(_buf: &mut [u8]) -> libc::c_long { -1 } - - fn getrandom_fill_bytes(v: &mut [u8]) { - let mut read = 0; - let len = v.len(); - while read < len { - let result = getrandom(&mut v[read..]); - if result == -1 { - let err = io::Error::last_os_error(); - if err.kind() == io::ErrorKind::Interrupted { - continue - } else { - panic!("unexpected getrandom error: {}", err); - } - } else { - read += result as usize; - } - } - } - - #[cfg(all(target_os = "linux", - any(target_arch = "x86_64", - target_arch = "x86", - target_arch = "arm", - target_arch = "aarch64", - target_arch = "powerpc")))] - fn is_getrandom_available() -> bool { - use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering}; - use std::sync::{Once, ONCE_INIT}; - - static CHECKER: Once = ONCE_INIT; - static AVAILABLE: AtomicBool = ATOMIC_BOOL_INIT; - - CHECKER.call_once(|| { - let mut buf: [u8; 0] = []; - let result = getrandom(&mut buf); - let available = if result == -1 { - let err = io::Error::last_os_error().raw_os_error(); - err != Some(libc::ENOSYS) - } else { - true - }; - AVAILABLE.store(available, Ordering::Relaxed); - }); - - AVAILABLE.load(Ordering::Relaxed) - } - - #[cfg(not(all(target_os = "linux", - any(target_arch = "x86_64", - target_arch = "x86", - target_arch = "arm", - target_arch = "aarch64", - target_arch = "powerpc"))))] - fn is_getrandom_available() -> bool { false } - - pub struct OsRng { - inner: OsRngInner, - } - - enum OsRngInner { - OsGetrandomRng, - OsReadRng(ReadRng), - } - - impl OsRng { - pub fn new() -> io::Result { - if is_getrandom_available() { - return Ok(OsRng { inner: OsGetrandomRng }); - } - - let reader = try!(File::open("/dev/urandom")); - let reader_rng = ReadRng::new(reader); - - Ok(OsRng { inner: OsReadRng(reader_rng) }) - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - match self.inner { - OsGetrandomRng => next_u32(&mut getrandom_fill_bytes), - OsReadRng(ref mut rng) => rng.next_u32(), - } - } - fn next_u64(&mut self) -> u64 { - match self.inner { - OsGetrandomRng => next_u64(&mut getrandom_fill_bytes), - OsReadRng(ref mut rng) => rng.next_u64(), - } - } - fn fill_bytes(&mut self, v: &mut [u8]) { - match self.inner { - OsGetrandomRng => getrandom_fill_bytes(v), - OsReadRng(ref mut rng) => rng.fill_bytes(v) - } - } - } -} - -#[cfg(target_os = "ios")] -mod imp { - extern crate libc; - - use super::{next_u32, next_u64}; - - use std::io; - use Rng; - use self::libc::{c_int, size_t}; - - #[derive(Debug)] - pub struct OsRng; - - enum SecRandom {} - - #[allow(non_upper_case_globals)] - const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom; - - #[link(name = "Security", kind = "framework")] - extern { - fn SecRandomCopyBytes(rnd: *const SecRandom, - count: size_t, bytes: *mut u8) -> c_int; - } - - impl OsRng { - pub fn new() -> io::Result { - Ok(OsRng) - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - next_u32(&mut |v| self.fill_bytes(v)) - } - fn next_u64(&mut self) -> u64 { - next_u64(&mut |v| self.fill_bytes(v)) - } - fn fill_bytes(&mut self, v: &mut [u8]) { - let ret = unsafe { - SecRandomCopyBytes(kSecRandomDefault, v.len() as size_t, v.as_mut_ptr()) - }; - if ret == -1 { - panic!("couldn't generate random bytes: {}", io::Error::last_os_error()); - } - } - } -} - -#[cfg(target_os = "freebsd")] -mod imp { - extern crate libc; - - use std::{io, ptr}; - use Rng; - - use super::{next_u32, next_u64}; - - #[derive(Debug)] - pub struct OsRng; - - impl OsRng { - pub fn new() -> io::Result { - Ok(OsRng) - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - next_u32(&mut |v| self.fill_bytes(v)) - } - fn next_u64(&mut self) -> u64 { - next_u64(&mut |v| self.fill_bytes(v)) - } - fn fill_bytes(&mut self, v: &mut [u8]) { - let mib = [libc::CTL_KERN, libc::KERN_ARND]; - // kern.arandom permits a maximum buffer size of 256 bytes - for s in v.chunks_mut(256) { - let mut s_len = s.len(); - let ret = unsafe { - libc::sysctl(mib.as_ptr(), mib.len() as libc::c_uint, - s.as_mut_ptr() as *mut _, &mut s_len, - ptr::null(), 0) - }; - if ret == -1 || s_len != s.len() { - panic!("kern.arandom sysctl failed! (returned {}, s.len() {}, oldlenp {})", - ret, s.len(), s_len); - } - } - } - } -} - -#[cfg(target_os = "openbsd")] -mod imp { - extern crate libc; - - use std::io; - use Rng; - - use super::{next_u32, next_u64}; - - #[derive(Debug)] - pub struct OsRng; - - impl OsRng { - pub fn new() -> io::Result { - Ok(OsRng) - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - next_u32(&mut |v| self.fill_bytes(v)) - } - fn next_u64(&mut self) -> u64 { - next_u64(&mut |v| self.fill_bytes(v)) - } - fn fill_bytes(&mut self, v: &mut [u8]) { - // getentropy(2) permits a maximum buffer size of 256 bytes - for s in v.chunks_mut(256) { - let ret = unsafe { - libc::getentropy(s.as_mut_ptr() as *mut libc::c_void, s.len()) - }; - if ret == -1 { - let err = io::Error::last_os_error(); - panic!("getentropy failed: {}", err); - } - } - } - } -} - -#[cfg(target_os = "redox")] -mod imp { - use std::io; - use std::fs::File; - use Rng; - use read::ReadRng; - - #[derive(Debug)] - pub struct OsRng { - inner: ReadRng, - } - - impl OsRng { - pub fn new() -> io::Result { - let reader = try!(File::open("rand:")); - let reader_rng = ReadRng::new(reader); - - Ok(OsRng { inner: reader_rng }) - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - self.inner.next_u32() - } - fn next_u64(&mut self) -> u64 { - self.inner.next_u64() - } - fn fill_bytes(&mut self, v: &mut [u8]) { - self.inner.fill_bytes(v) - } - } -} - -#[cfg(windows)] -mod imp { - use std::io; - use std::ptr; - use Rng; - - use super::{next_u32, next_u64}; - - type BOOL = i32; - type LPCSTR = *const i8; - type DWORD = u32; - type HCRYPTPROV = usize; - type BYTE = u8; - - const PROV_RSA_FULL: DWORD = 1; - const CRYPT_SILENT: DWORD = 0x00000040; - const CRYPT_VERIFYCONTEXT: DWORD = 0xF0000000; - - #[link(name = "advapi32")] - extern "system" { - fn CryptAcquireContextA(phProv: *mut HCRYPTPROV, - szContainer: LPCSTR, - szProvider: LPCSTR, - dwProvType: DWORD, - dwFlags: DWORD) -> BOOL; - fn CryptGenRandom(hProv: HCRYPTPROV, - dwLen: DWORD, - pbBuffer: *mut BYTE) -> BOOL; - fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> BOOL; - } - - #[derive(Debug)] - pub struct OsRng { - hcryptprov: HCRYPTPROV - } - - impl OsRng { - pub fn new() -> io::Result { - let mut hcp = 0; - let ret = unsafe { - CryptAcquireContextA(&mut hcp, ptr::null(), ptr::null(), - PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT | CRYPT_SILENT) - }; - - if ret == 0 { - Err(io::Error::last_os_error()) - } else { - Ok(OsRng { hcryptprov: hcp }) - } - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - next_u32(&mut |v| self.fill_bytes(v)) - } - fn next_u64(&mut self) -> u64 { - next_u64(&mut |v| self.fill_bytes(v)) - } - fn fill_bytes(&mut self, v: &mut [u8]) { - // CryptGenRandom takes a DWORD (u32) for the length so we need to - // split up the buffer. - for slice in v.chunks_mut(::max_value() as usize) { - let ret = unsafe { - CryptGenRandom(self.hcryptprov, slice.len() as DWORD, - slice.as_mut_ptr()) - }; - if ret == 0 { - panic!("couldn't generate random bytes: {}", - io::Error::last_os_error()); - } - } - } - } - - impl Drop for OsRng { - fn drop(&mut self) { - let ret = unsafe { - CryptReleaseContext(self.hcryptprov, 0) - }; - if ret == 0 { - panic!("couldn't release context: {}", - io::Error::last_os_error()); - } - } - } -} - -#[cfg(target_os = "nacl")] -mod imp { - extern crate libc; - - use std::io; - use std::mem; - use Rng; - - use super::{next_u32, next_u64}; - - #[derive(Debug)] - pub struct OsRng(extern fn(dest: *mut libc::c_void, - bytes: libc::size_t, - read: *mut libc::size_t) -> libc::c_int); - - extern { - fn nacl_interface_query(name: *const libc::c_char, - table: *mut libc::c_void, - table_size: libc::size_t) -> libc::size_t; - } - - const INTERFACE: &'static [u8] = b"nacl-irt-random-0.1\0"; - - #[repr(C)] - struct NaClIRTRandom { - get_random_bytes: Option libc::c_int>, - } - - impl OsRng { - pub fn new() -> io::Result { - let mut iface = NaClIRTRandom { - get_random_bytes: None, - }; - let result = unsafe { - nacl_interface_query(INTERFACE.as_ptr() as *const _, - mem::transmute(&mut iface), - mem::size_of::() as libc::size_t) - }; - if result != 0 { - assert!(iface.get_random_bytes.is_some()); - let result = OsRng(iface.get_random_bytes.take().unwrap()); - Ok(result) - } else { - let error = io::ErrorKind::NotFound; - let error = io::Error::new(error, "IRT random interface missing"); - Err(error) - } - } - } - - impl Rng for OsRng { - fn next_u32(&mut self) -> u32 { - next_u32(&mut |v| self.fill_bytes(v)) - } - fn next_u64(&mut self) -> u64 { - next_u64(&mut |v| self.fill_bytes(v)) - } - fn fill_bytes(&mut self, v: &mut [u8]) { - let mut read = 0; - loop { - let mut r: libc::size_t = 0; - let len = v.len(); - let error = (self.0)(v[read..].as_mut_ptr() as *mut _, - (len - read) as libc::size_t, - &mut r as *mut _); - assert!(error == 0, "`get_random_bytes` failed!"); - read += r as usize; - - if read >= v.len() { break; } - } - } - } -} - - -#[cfg(test)] -mod test { - use std::sync::mpsc::channel; - use Rng; - use OsRng; - use std::thread; - - #[test] - fn test_os_rng() { - let mut r = OsRng::new().unwrap(); - - r.next_u32(); - r.next_u64(); - - let mut v = [0u8; 1000]; - r.fill_bytes(&mut v); - } - - #[test] - fn test_os_rng_tasks() { - - let mut txs = vec!(); - for _ in 0..20 { - let (tx, rx) = channel(); - txs.push(tx); - - thread::spawn(move|| { - // wait until all the tasks are ready to go. - rx.recv().unwrap(); - - // deschedule to attempt to interleave things as much - // as possible (XXX: is this a good test?) - let mut r = OsRng::new().unwrap(); - thread::yield_now(); - let mut v = [0u8; 1000]; - - for _ in 0..100 { - r.next_u32(); - thread::yield_now(); - r.next_u64(); - thread::yield_now(); - r.fill_bytes(&mut v); - thread::yield_now(); - } - }); - } - - // start all the tasks - for tx in txs.iter() { - tx.send(()).unwrap(); - } - } -} diff --git a/Chapter03/rand/src/rand_impls.rs b/Chapter03/rand/src/rand_impls.rs deleted file mode 100644 index 5a7e3de..0000000 --- a/Chapter03/rand/src/rand_impls.rs +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The implementations of `Rand` for the built-in types. - -use std::char; -use std::mem; - -use {Rand,Rng}; - -impl Rand for isize { - #[inline] - fn rand(rng: &mut R) -> isize { - if mem::size_of::() == 4 { - rng.gen::() as isize - } else { - rng.gen::() as isize - } - } -} - -impl Rand for i8 { - #[inline] - fn rand(rng: &mut R) -> i8 { - rng.next_u32() as i8 - } -} - -impl Rand for i16 { - #[inline] - fn rand(rng: &mut R) -> i16 { - rng.next_u32() as i16 - } -} - -impl Rand for i32 { - #[inline] - fn rand(rng: &mut R) -> i32 { - rng.next_u32() as i32 - } -} - -impl Rand for i64 { - #[inline] - fn rand(rng: &mut R) -> i64 { - rng.next_u64() as i64 - } -} - -impl Rand for usize { - #[inline] - fn rand(rng: &mut R) -> usize { - if mem::size_of::() == 4 { - rng.gen::() as usize - } else { - rng.gen::() as usize - } - } -} - -impl Rand for u8 { - #[inline] - fn rand(rng: &mut R) -> u8 { - rng.next_u32() as u8 - } -} - -impl Rand for u16 { - #[inline] - fn rand(rng: &mut R) -> u16 { - rng.next_u32() as u16 - } -} - -impl Rand for u32 { - #[inline] - fn rand(rng: &mut R) -> u32 { - rng.next_u32() - } -} - -impl Rand for u64 { - #[inline] - fn rand(rng: &mut R) -> u64 { - rng.next_u64() - } -} - -macro_rules! float_impls { - ($mod_name:ident, $ty:ty, $mantissa_bits:expr, $method_name:ident) => { - mod $mod_name { - use {Rand, Rng, Open01, Closed01}; - - const SCALE: $ty = (1u64 << $mantissa_bits) as $ty; - - impl Rand for $ty { - /// Generate a floating point number in the half-open - /// interval `[0,1)`. - /// - /// See `Closed01` for the closed interval `[0,1]`, - /// and `Open01` for the open interval `(0,1)`. - #[inline] - fn rand(rng: &mut R) -> $ty { - rng.$method_name() - } - } - impl Rand for Open01<$ty> { - #[inline] - fn rand(rng: &mut R) -> Open01<$ty> { - // add a small amount (specifically 2 bits below - // the precision of f64/f32 at 1.0), so that small - // numbers are larger than 0, but large numbers - // aren't pushed to/above 1. - Open01(rng.$method_name() + 0.25 / SCALE) - } - } - impl Rand for Closed01<$ty> { - #[inline] - fn rand(rng: &mut R) -> Closed01<$ty> { - // rescale so that 1.0 - epsilon becomes 1.0 - // precisely. - Closed01(rng.$method_name() * SCALE / (SCALE - 1.0)) - } - } - } - } -} -float_impls! { f64_rand_impls, f64, 53, next_f64 } -float_impls! { f32_rand_impls, f32, 24, next_f32 } - -impl Rand for char { - #[inline] - fn rand(rng: &mut R) -> char { - // a char is 21 bits - const CHAR_MASK: u32 = 0x001f_ffff; - loop { - // Rejection sampling. About 0.2% of numbers with at most - // 21-bits are invalid codepoints (surrogates), so this - // will succeed first go almost every time. - match char::from_u32(rng.next_u32() & CHAR_MASK) { - Some(c) => return c, - None => {} - } - } - } -} - -impl Rand for bool { - #[inline] - fn rand(rng: &mut R) -> bool { - rng.gen::() & 1 == 1 - } -} - -macro_rules! tuple_impl { - // use variables to indicate the arity of the tuple - ($($tyvar:ident),* ) => { - // the trailing commas are for the 1 tuple - impl< - $( $tyvar : Rand ),* - > Rand for ( $( $tyvar ),* , ) { - - #[inline] - fn rand(_rng: &mut R) -> ( $( $tyvar ),* , ) { - ( - // use the $tyvar's to get the appropriate number of - // repeats (they're not actually needed) - $( - _rng.gen::<$tyvar>() - ),* - , - ) - } - } - } -} - -impl Rand for () { - #[inline] - fn rand(_: &mut R) -> () { () } -} -tuple_impl!{A} -tuple_impl!{A, B} -tuple_impl!{A, B, C} -tuple_impl!{A, B, C, D} -tuple_impl!{A, B, C, D, E} -tuple_impl!{A, B, C, D, E, F} -tuple_impl!{A, B, C, D, E, F, G} -tuple_impl!{A, B, C, D, E, F, G, H} -tuple_impl!{A, B, C, D, E, F, G, H, I} -tuple_impl!{A, B, C, D, E, F, G, H, I, J} -tuple_impl!{A, B, C, D, E, F, G, H, I, J, K} -tuple_impl!{A, B, C, D, E, F, G, H, I, J, K, L} - -macro_rules! array_impl { - {$n:expr, $t:ident, $($ts:ident,)*} => { - array_impl!{($n - 1), $($ts,)*} - - impl Rand for [T; $n] where T: Rand { - #[inline] - fn rand(_rng: &mut R) -> [T; $n] { - [_rng.gen::<$t>(), $(_rng.gen::<$ts>()),*] - } - } - }; - {$n:expr,} => { - impl Rand for [T; $n] { - fn rand(_rng: &mut R) -> [T; $n] { [] } - } - }; -} - -array_impl!{32, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,} - -impl Rand for Option { - #[inline] - fn rand(rng: &mut R) -> Option { - if rng.gen() { - Some(rng.gen()) - } else { - None - } - } -} - -#[cfg(test)] -mod tests { - use {Rng, thread_rng, Open01, Closed01}; - - struct ConstantRng(u64); - impl Rng for ConstantRng { - fn next_u32(&mut self) -> u32 { - let ConstantRng(v) = *self; - v as u32 - } - fn next_u64(&mut self) -> u64 { - let ConstantRng(v) = *self; - v - } - } - - #[test] - fn floating_point_edge_cases() { - // the test for exact equality is correct here. - assert!(ConstantRng(0xffff_ffff).gen::() != 1.0); - assert!(ConstantRng(0xffff_ffff_ffff_ffff).gen::() != 1.0); - } - - #[test] - fn rand_open() { - // this is unlikely to catch an incorrect implementation that - // generates exactly 0 or 1, but it keeps it sane. - let mut rng = thread_rng(); - for _ in 0..1_000 { - // strict inequalities - let Open01(f) = rng.gen::>(); - assert!(0.0 < f && f < 1.0); - - let Open01(f) = rng.gen::>(); - assert!(0.0 < f && f < 1.0); - } - } - - #[test] - fn rand_closed() { - let mut rng = thread_rng(); - for _ in 0..1_000 { - // strict inequalities - let Closed01(f) = rng.gen::>(); - assert!(0.0 <= f && f <= 1.0); - - let Closed01(f) = rng.gen::>(); - assert!(0.0 <= f && f <= 1.0); - } - } -} diff --git a/Chapter03/rand/src/read.rs b/Chapter03/rand/src/read.rs deleted file mode 100644 index c7351b7..0000000 --- a/Chapter03/rand/src/read.rs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! A wrapper around any Read to treat it as an RNG. - -use std::io::{self, Read}; -use std::mem; -use Rng; - -/// An RNG that reads random bytes straight from a `Read`. This will -/// work best with an infinite reader, but this is not required. -/// -/// # Panics -/// -/// It will panic if it there is insufficient data to fulfill a request. -/// -/// # Example -/// -/// ```rust -/// use rand::{read, Rng}; -/// -/// let data = vec![1, 2, 3, 4, 5, 6, 7, 8]; -/// let mut rng = read::ReadRng::new(&data[..]); -/// println!("{:x}", rng.gen::()); -/// ``` -#[derive(Debug)] -pub struct ReadRng { - reader: R -} - -impl ReadRng { - /// Create a new `ReadRng` from a `Read`. - pub fn new(r: R) -> ReadRng { - ReadRng { - reader: r - } - } -} - -impl Rng for ReadRng { - fn next_u32(&mut self) -> u32 { - // This is designed for speed: reading a LE integer on a LE - // platform just involves blitting the bytes into the memory - // of the u32, similarly for BE on BE; avoiding byteswapping. - let mut buf = [0; 4]; - fill(&mut self.reader, &mut buf).unwrap(); - unsafe { *(buf.as_ptr() as *const u32) } - } - fn next_u64(&mut self) -> u64 { - // see above for explanation. - let mut buf = [0; 8]; - fill(&mut self.reader, &mut buf).unwrap(); - unsafe { *(buf.as_ptr() as *const u64) } - } - fn fill_bytes(&mut self, v: &mut [u8]) { - if v.len() == 0 { return } - fill(&mut self.reader, v).unwrap(); - } -} - -fn fill(r: &mut Read, mut buf: &mut [u8]) -> io::Result<()> { - while buf.len() > 0 { - match try!(r.read(buf)) { - 0 => return Err(io::Error::new(io::ErrorKind::Other, - "end of file reached")), - n => buf = &mut mem::replace(&mut buf, &mut [])[n..], - } - } - Ok(()) -} - -#[cfg(test)] -mod test { - use super::ReadRng; - use Rng; - - #[test] - fn test_reader_rng_u64() { - // transmute from the target to avoid endianness concerns. - let v = vec![0u8, 0, 0, 0, 0, 0, 0, 1, - 0 , 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 3]; - let mut rng = ReadRng::new(&v[..]); - - assert_eq!(rng.next_u64(), 1_u64.to_be()); - assert_eq!(rng.next_u64(), 2_u64.to_be()); - assert_eq!(rng.next_u64(), 3_u64.to_be()); - } - #[test] - fn test_reader_rng_u32() { - let v = vec![0u8, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3]; - let mut rng = ReadRng::new(&v[..]); - - assert_eq!(rng.next_u32(), 1_u32.to_be()); - assert_eq!(rng.next_u32(), 2_u32.to_be()); - assert_eq!(rng.next_u32(), 3_u32.to_be()); - } - #[test] - fn test_reader_rng_fill_bytes() { - let v = [1u8, 2, 3, 4, 5, 6, 7, 8]; - let mut w = [0u8; 8]; - - let mut rng = ReadRng::new(&v[..]); - rng.fill_bytes(&mut w); - - assert!(v == w); - } - - #[test] - #[should_panic] - fn test_reader_rng_insufficient_bytes() { - let mut rng = ReadRng::new(&[][..]); - let mut v = [0u8; 3]; - rng.fill_bytes(&mut v); - } -} diff --git a/Chapter03/rand/src/reseeding.rs b/Chapter03/rand/src/reseeding.rs deleted file mode 100644 index 2fba9f4..0000000 --- a/Chapter03/rand/src/reseeding.rs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! A wrapper around another RNG that reseeds it after it -//! generates a certain number of random bytes. - -use std::default::Default; - -use {Rng, SeedableRng}; - -/// How many bytes of entropy the underling RNG is allowed to generate -/// before it is reseeded -const DEFAULT_GENERATION_THRESHOLD: u64 = 32 * 1024; - -/// A wrapper around any RNG which reseeds the underlying RNG after it -/// has generated a certain number of random bytes. -#[derive(Debug)] -pub struct ReseedingRng { - rng: R, - generation_threshold: u64, - bytes_generated: u64, - /// Controls the behaviour when reseeding the RNG. - pub reseeder: Rsdr, -} - -impl> ReseedingRng { - /// Create a new `ReseedingRng` with the given parameters. - /// - /// # Arguments - /// - /// * `rng`: the random number generator to use. - /// * `generation_threshold`: the number of bytes of entropy at which to reseed the RNG. - /// * `reseeder`: the reseeding object to use. - pub fn new(rng: R, generation_threshold: u64, reseeder: Rsdr) -> ReseedingRng { - ReseedingRng { - rng: rng, - generation_threshold: generation_threshold, - bytes_generated: 0, - reseeder: reseeder - } - } - - /// Reseed the internal RNG if the number of bytes that have been - /// generated exceed the threshold. - pub fn reseed_if_necessary(&mut self) { - if self.bytes_generated >= self.generation_threshold { - self.reseeder.reseed(&mut self.rng); - self.bytes_generated = 0; - } - } -} - - -impl> Rng for ReseedingRng { - fn next_u32(&mut self) -> u32 { - self.reseed_if_necessary(); - self.bytes_generated += 4; - self.rng.next_u32() - } - - fn next_u64(&mut self) -> u64 { - self.reseed_if_necessary(); - self.bytes_generated += 8; - self.rng.next_u64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - self.reseed_if_necessary(); - self.bytes_generated += dest.len() as u64; - self.rng.fill_bytes(dest) - } -} - -impl, Rsdr: Reseeder + Default> - SeedableRng<(Rsdr, S)> for ReseedingRng { - fn reseed(&mut self, (rsdr, seed): (Rsdr, S)) { - self.rng.reseed(seed); - self.reseeder = rsdr; - self.bytes_generated = 0; - } - - /// Create a new `ReseedingRng` from the given reseeder and - /// seed. This uses a default value for `generation_threshold`. - fn from_seed((rsdr, seed): (Rsdr, S)) -> ReseedingRng { - ReseedingRng { - rng: SeedableRng::from_seed(seed), - generation_threshold: DEFAULT_GENERATION_THRESHOLD, - bytes_generated: 0, - reseeder: rsdr - } - } -} - -/// Something that can be used to reseed an RNG via `ReseedingRng`. -/// -/// # Example -/// -/// ```rust -/// use rand::{Rng, SeedableRng, StdRng}; -/// use rand::reseeding::{Reseeder, ReseedingRng}; -/// -/// struct TickTockReseeder { tick: bool } -/// impl Reseeder for TickTockReseeder { -/// fn reseed(&mut self, rng: &mut StdRng) { -/// let val = if self.tick {0} else {1}; -/// rng.reseed(&[val]); -/// self.tick = !self.tick; -/// } -/// } -/// fn main() { -/// let rsdr = TickTockReseeder { tick: true }; -/// -/// let inner = StdRng::new().unwrap(); -/// let mut rng = ReseedingRng::new(inner, 10, rsdr); -/// -/// // this will repeat, because it gets reseeded very regularly. -/// let s: String = rng.gen_ascii_chars().take(100).collect(); -/// println!("{}", s); -/// } -/// -/// ``` -pub trait Reseeder { - /// Reseed the given RNG. - fn reseed(&mut self, rng: &mut R); -} - -/// Reseed an RNG using a `Default` instance. This reseeds by -/// replacing the RNG with the result of a `Default::default` call. -#[derive(Clone, Copy, Debug)] -pub struct ReseedWithDefault; - -impl Reseeder for ReseedWithDefault { - fn reseed(&mut self, rng: &mut R) { - *rng = Default::default(); - } -} -impl Default for ReseedWithDefault { - fn default() -> ReseedWithDefault { ReseedWithDefault } -} - -#[cfg(test)] -mod test { - use std::default::Default; - use std::iter::repeat; - use super::{ReseedingRng, ReseedWithDefault}; - use {SeedableRng, Rng}; - - struct Counter { - i: u32 - } - - impl Rng for Counter { - fn next_u32(&mut self) -> u32 { - self.i += 1; - // very random - self.i - 1 - } - } - impl Default for Counter { - fn default() -> Counter { - Counter { i: 0 } - } - } - impl SeedableRng for Counter { - fn reseed(&mut self, seed: u32) { - self.i = seed; - } - fn from_seed(seed: u32) -> Counter { - Counter { i: seed } - } - } - type MyRng = ReseedingRng; - - #[test] - fn test_reseeding() { - let mut rs = ReseedingRng::new(Counter {i:0}, 400, ReseedWithDefault); - - let mut i = 0; - for _ in 0..1000 { - assert_eq!(rs.next_u32(), i % 100); - i += 1; - } - } - - #[test] - fn test_rng_seeded() { - let mut ra: MyRng = SeedableRng::from_seed((ReseedWithDefault, 2)); - let mut rb: MyRng = SeedableRng::from_seed((ReseedWithDefault, 2)); - assert!(::test::iter_eq(ra.gen_ascii_chars().take(100), - rb.gen_ascii_chars().take(100))); - } - - #[test] - fn test_rng_reseed() { - let mut r: MyRng = SeedableRng::from_seed((ReseedWithDefault, 3)); - let string1: String = r.gen_ascii_chars().take(100).collect(); - - r.reseed((ReseedWithDefault, 3)); - - let string2: String = r.gen_ascii_chars().take(100).collect(); - assert_eq!(string1, string2); - } - - const FILL_BYTES_V_LEN: usize = 13579; - #[test] - fn test_rng_fill_bytes() { - let mut v = repeat(0u8).take(FILL_BYTES_V_LEN).collect::>(); - ::test::rng().fill_bytes(&mut v); - - // Sanity test: if we've gotten here, `fill_bytes` has not infinitely - // recursed. - assert_eq!(v.len(), FILL_BYTES_V_LEN); - - // To test that `fill_bytes` actually did something, check that the - // average of `v` is not 0. - let mut sum = 0.0; - for &x in v.iter() { - sum += x as f64; - } - assert!(sum / v.len() as f64 != 0.0); - } -} diff --git a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/dep-lib-libc b/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/dep-lib-libc deleted file mode 100644 index ea275fa..0000000 Binary files a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/dep-lib-libc and /dev/null differ diff --git a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc b/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc deleted file mode 100644 index 49ac983..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc +++ /dev/null @@ -1 +0,0 @@ -00b3ce50ff4e2fa3 \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc.json b/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc.json deleted file mode 100644 index db7c518..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/libc-690db683275b166f/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12975131716389151093,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.20"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/dep-lib-log b/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/dep-lib-log deleted file mode 100644 index 6643779..0000000 Binary files a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/dep-lib-log and /dev/null differ diff --git a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log b/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log deleted file mode 100644 index d6f15c1..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log +++ /dev/null @@ -1 +0,0 @@ -0386d490cfd1cf86 \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log.json b/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log.json deleted file mode 100644 index 545e3a2..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/log-2de875c5fdd1481e/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16683876292893560632,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.6"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-lib-rand b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-lib-rand deleted file mode 100644 index 7349078..0000000 Binary files a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-lib-rand and /dev/null differ diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-test-lib-rand b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-test-lib-rand deleted file mode 100644 index 8d4979b..0000000 Binary files a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/dep-test-lib-rand and /dev/null differ diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand deleted file mode 100644 index 6a86948..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand +++ /dev/null @@ -1 +0,0 @@ -c87f2d34bf1b24ae \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand.json b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand.json deleted file mode 100644 index c22545f..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/lib-rand.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":18309307838176817349,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1486960765,626905856],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,51,47,114,97,110,100,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,114,97,110,100,45,49,51,57,51,54,55,52,97,50,54,53,54,102,100,51,102,47,100,101,112,45,108,105,98,45,114,97,110,100]]},"features":"None","deps":[["libc v0.2.20",11758704010567004928]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand deleted file mode 100644 index b68027b..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand +++ /dev/null @@ -1 +0,0 @@ -343e5f32bdbe7da6 \ No newline at end of file diff --git a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand.json b/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand.json deleted file mode 100644 index 9aa8c82..0000000 --- a/Chapter03/rand/target/debug/.fingerprint/rand-1393674a2656fd3f/test-lib-rand.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":18309307838176817349,"profile":14216767367406228602,"local":{"variant":"MtimeBased","fields":[[1486963004,22989332],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,51,47,114,97,110,100,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,114,97,110,100,45,49,51,57,51,54,55,52,97,50,54,53,54,102,100,51,102,47,100,101,112,45,116,101,115,116,45,108,105,98,45,114,97,110,100]]},"features":"None","deps":[["libc v0.2.20",11758704010567004928],["log v0.3.6",9714213610679731715]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter03/rand/target/debug/deps/liblibc-29ef97a68464c2b7.rlib b/Chapter03/rand/target/debug/deps/liblibc-29ef97a68464c2b7.rlib deleted file mode 100644 index 526c2eb..0000000 Binary files a/Chapter03/rand/target/debug/deps/liblibc-29ef97a68464c2b7.rlib and /dev/null differ diff --git a/Chapter03/rand/target/debug/deps/liblog-bf16bb9a4912b11d.rlib b/Chapter03/rand/target/debug/deps/liblog-bf16bb9a4912b11d.rlib deleted file mode 100644 index 9e81126..0000000 Binary files a/Chapter03/rand/target/debug/deps/liblog-bf16bb9a4912b11d.rlib and /dev/null differ diff --git a/Chapter03/rand/target/debug/deps/librand.rlib b/Chapter03/rand/target/debug/deps/librand.rlib deleted file mode 100644 index a4dbe8d..0000000 Binary files a/Chapter03/rand/target/debug/deps/librand.rlib and /dev/null differ diff --git a/Chapter03/rand/target/debug/deps/rand-39d32343cad3c69a b/Chapter03/rand/target/debug/deps/rand-39d32343cad3c69a deleted file mode 100644 index 01c7b03..0000000 Binary files a/Chapter03/rand/target/debug/deps/rand-39d32343cad3c69a and /dev/null differ diff --git a/Chapter03/rand/target/debug/librand.rlib b/Chapter03/rand/target/debug/librand.rlib deleted file mode 100644 index a4dbe8d..0000000 Binary files a/Chapter03/rand/target/debug/librand.rlib and /dev/null differ diff --git a/Chapter03/rand/target/debug/rand-39d32343cad3c69a b/Chapter03/rand/target/debug/rand-39d32343cad3c69a deleted file mode 100644 index 01c7b03..0000000 Binary files a/Chapter03/rand/target/debug/rand-39d32343cad3c69a and /dev/null differ diff --git a/Chapter04/actors/Cargo.toml b/Chapter04/actors/Cargo.toml new file mode 100644 index 0000000..e05a077 --- /dev/null +++ b/Chapter04/actors/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "actors" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +actix = "^0.8" +rand = "0.5" \ No newline at end of file diff --git a/Chapter04/actors/src/main.rs b/Chapter04/actors/src/main.rs new file mode 100644 index 0000000..a9446cc --- /dev/null +++ b/Chapter04/actors/src/main.rs @@ -0,0 +1,49 @@ + +use actix::prelude::*; +use std::thread; +use std::time::Duration; +use rand::prelude::*; + +const N_THREADS : usize = 3; + +/// +/// A mock sensor function +/// +fn read_sensordata() -> f32 { + random::() * 10.0 +} + +#[derive(Debug, Message)] +struct Sensordata(pub u64, pub f32); + +struct DBWriter; + +impl Actor for DBWriter { + type Context = SyncContext; +} + +impl Handler for DBWriter { + type Result = (); + + fn handle(&mut self, msg: Sensordata, _: &mut Self::Context) -> Self::Result { + + // send stuff somewhere and handle the results + println!(" {:?}", msg); + thread::sleep(Duration::from_millis(300)); + } +} + +fn main() -> std::io::Result<()> { + System::run(|| { + println!(">> Press Ctrl-C to stop the program"); + // start multi threaded actor host (arbiter) with 2 threads + let sender = SyncArbiter::start(N_THREADS, || DBWriter); + + // send messages to the actor + for n in 0..10_000 { + let my_timestamp = n as u64; + let data = read_sensordata(); + sender.do_send(Sensordata(my_timestamp, data)); + } + }) +} diff --git a/Chapter04/async-await/Cargo.toml b/Chapter04/async-await/Cargo.toml new file mode 100644 index 0000000..905e1fb --- /dev/null +++ b/Chapter04/async-await/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "async-await" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +tokio = { version = "0.1", features = ["async-await-preview"] } +hyper = "0.12" diff --git a/Chapter04/async-await/src/main.rs b/Chapter04/async-await/src/main.rs new file mode 100644 index 0000000..30cf984 --- /dev/null +++ b/Chapter04/async-await/src/main.rs @@ -0,0 +1,22 @@ +#![feature(await_macro, async_await)] + +use tokio::await; +use tokio::prelude::*; +use hyper::{Client, StatusCode}; +use std::time::Duration; +use std::str; + +async fn response_code(url: &str) -> StatusCode { + let uri = url.parse().unwrap(); + let client = Client::new(); + let response = await!(client.get(uri) + .timeout(Duration::from_secs(30))).unwrap(); + response.status() +} + +fn main() { + tokio::run_async(async { + let status = await!(response_code("http://blog.x5ff.xyz")); + println!("Got the status: {}", status); + }); +} \ No newline at end of file diff --git a/Chapter04/black-white/Cargo.toml b/Chapter04/black-white/Cargo.toml new file mode 100644 index 0000000..1cde4c1 --- /dev/null +++ b/Chapter04/black-white/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "black-white" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter04/black-white/src/main.rs b/Chapter04/black-white/src/main.rs new file mode 100644 index 0000000..e1d08a0 --- /dev/null +++ b/Chapter04/black-white/src/main.rs @@ -0,0 +1,42 @@ +use std::sync::{Arc, Mutex}; +use std::thread; +use std::time::Duration; + +/// +/// A simple enum with only two variations: black and white +/// +#[derive(Debug)] +enum Shade { + Black, + White, +} + +fn new_painter_thread(data: Arc>>) -> thread::JoinHandle<()> { + thread::spawn(move || loop { + { + // create a scope to release the mutex as quickly as possible + let mut d = data.lock().unwrap(); + if d.len() > 0 { + match d[d.len() - 1] { + Shade::Black => d.push(Shade::White), + Shade::White => d.push(Shade::Black), + } + } else { + d.push(Shade::Black) + } + if d.len() > 5 { + break; + } + } + // slow things down a little + thread::sleep(Duration::from_secs(1)); + }) +} + +fn main() { + let data = Arc::new(Mutex::new(vec![])); + let threads: Vec> = + (0..2).map(|_| new_painter_thread(data.clone())).collect(); + let _: Vec<()> = threads.into_iter().map(|t| t.join().unwrap()).collect(); + println!("Result: {:?}", data); +} diff --git a/Chapter04/channels/Cargo.toml b/Chapter04/channels/Cargo.toml new file mode 100644 index 0000000..47e8d34 --- /dev/null +++ b/Chapter04/channels/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "channels" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +rand = "^0.5" \ No newline at end of file diff --git a/Chapter04/channels/src/main.rs b/Chapter04/channels/src/main.rs new file mode 100644 index 0000000..1b7e7f2 --- /dev/null +++ b/Chapter04/channels/src/main.rs @@ -0,0 +1,41 @@ +// Using standard libraries +use std::sync::mpsc::{Sender, Receiver}; +use std::sync::mpsc; +use std::thread; + +use rand::prelude::*; +use std::time::Duration; + +enum ChartValue { + Star(usize), + Pipe(usize) +} + +fn main() { + let (tx, rx): (Sender, Receiver) = mpsc::channel(); + + let pipe_sender = tx.clone(); + + thread::spawn(move || { + loop { + pipe_sender.send(ChartValue::Pipe(random::() % 80)).unwrap(); + thread::sleep(Duration::from_millis(random::() % 800)); + } + }); + + let star_sender = tx.clone(); + thread::spawn(move || { + loop { + star_sender.send(ChartValue::Star(random::() % 80)).unwrap(); + thread::sleep(Duration::from_millis(random::() % 800)); + } + }); + + while let Ok(val) = rx.recv_timeout(Duration::from_secs(3)) { + + println!("{}", match val { + ChartValue::Pipe(v) => "|".repeat(v + 1), + ChartValue::Star(v) => "*".repeat(v + 1) + }); + } +} \ No newline at end of file diff --git a/Chapter04/child-processes/Cargo.toml b/Chapter04/child-processes/Cargo.toml new file mode 100644 index 0000000..335efba --- /dev/null +++ b/Chapter04/child-processes/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "child-processes" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter04/child-processes/src/main.rs b/Chapter04/child-processes/src/main.rs new file mode 100644 index 0000000..66f75dc --- /dev/null +++ b/Chapter04/child-processes/src/main.rs @@ -0,0 +1,61 @@ +use std::io::Write; +use std::process::{Command, Stdio}; + +#[derive(Debug)] +struct SearchResult { + query: String, + results: Vec, +} + +fn search_file(name: String) -> SearchResult { + let ps_child = Command::new("find") + .args(&[".", "-iname", &format!("{}", name)]) + .stdout(Stdio::piped()) + .output() + .expect("Could not spawn process"); + + let results = String::from_utf8_lossy(&ps_child.stdout); + let result_rows: Vec = results + .split("\n") + .map(|e| e.to_string()) + .filter(|s| s.len() > 1) + .collect(); + + SearchResult { + query: name, + results: result_rows, + } +} + +fn process_roundtrip() -> String { + let mut cat_child = Command::new("cat") + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn() + .expect("Could not spawn process"); + + let stdin = cat_child.stdin.as_mut().expect("Could not attach to stdin"); + + stdin + .write_all(b"datadatadata") + .expect("Could not write to child process"); + String::from_utf8( + cat_child + .wait_with_output() + .expect("Something went wrong") + .stdout + .as_slice() + .iter() + .cloned() + .collect(), + ) + .unwrap() +} + +fn main() { + println!("Reading from /bin/cat > {:?}", process_roundtrip()); + println!( + "Using 'find' to search for '*.rs': {:?}", + search_file("*.rs".to_owned()) + ) +} diff --git a/Chapter04/concurrent-processing/Cargo.toml b/Chapter04/concurrent-processing/Cargo.toml new file mode 100644 index 0000000..6174c85 --- /dev/null +++ b/Chapter04/concurrent-processing/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "concurrent-processing" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +rayon = "1.0.3" + + +[dev-dependencies] +criterion = "0.2.11" +rand = "^0.5" + + +[[bench]] +name = "seq_vs_par" +harness = false \ No newline at end of file diff --git a/Chapter04/concurrent-processing/benches/seq_vs_par.rs b/Chapter04/concurrent-processing/benches/seq_vs_par.rs new file mode 100644 index 0000000..62320d6 --- /dev/null +++ b/Chapter04/concurrent-processing/benches/seq_vs_par.rs @@ -0,0 +1,55 @@ +#[macro_use] +extern crate criterion; +use concurrent_processing::{ssqe, ssqe_sequential, seq_count_alpha_nums, par_count_alpha_nums}; +use criterion::{black_box, Criterion}; +use std::cell::RefCell; +use rand::prelude::*; + +const SEQ_LEN: usize = 1_000_000; +thread_local!(static ITEMS: RefCell<(Vec, Vec)> = { + let y_values: (Vec, Vec) = (0..SEQ_LEN).map(|_| (random::(), random::()) ) + .unzip(); + RefCell::new(y_values) +}); + + +const MAX_CHARS: usize = 100_000; +thread_local!(static CHARS: RefCell = { + let items: String = (0..MAX_CHARS).map(|_| random::()).collect(); + RefCell::new(items) +}); + +fn bench_count_seq(c: &mut Criterion) { + c.bench_function("Counting in sequence", |b| { + CHARS.with(|item| b.iter(|| black_box(seq_count_alpha_nums(&item.borrow())))) + }); +} + +fn bench_count_par(c: &mut Criterion) { + c.bench_function("Counting in parallel", |b| { + CHARS.with(|item| b.iter(|| black_box(par_count_alpha_nums(&item.borrow())))) + }); +} + + +fn bench_seq(c: &mut Criterion) { + c.bench_function("Sequential vector operation", |b| { + ITEMS.with(|y_values| { + let y_borrowed = y_values.borrow(); + b.iter(|| black_box(ssqe_sequential(&y_borrowed.0, &y_borrowed.1))) + }) + }); +} + +fn bench_par(c: &mut Criterion) { + c.bench_function("Parallel vector operation", |b| { + ITEMS.with(|y_values| { + let y_borrowed = y_values.borrow(); + b.iter(|| black_box(ssqe(&y_borrowed.0, &y_borrowed.1))) + }) + }); +} + +criterion_group!(benches, bench_seq, bench_par,bench_count_par, bench_count_seq); + +criterion_main!(benches); diff --git a/Chapter04/concurrent-processing/src/lib.rs b/Chapter04/concurrent-processing/src/lib.rs new file mode 100644 index 0000000..ded1a09 --- /dev/null +++ b/Chapter04/concurrent-processing/src/lib.rs @@ -0,0 +1,102 @@ +use rayon::prelude::*; + +/// +/// Sum of squared errors, a statistical error measure that squares and sums up the differences between predicted values and their ground truths. +/// +/// +pub fn ssqe(y: &[f32], y_predicted: &[f32]) -> Option { + if y.len() == y_predicted.len() { + let y_iter = y.par_iter(); + let y_pred_iter = y_predicted.par_iter(); + + Some( + y_iter + .zip(y_pred_iter) + .map(|(y, y_pred)| (y - y_pred).powi(2)) + .reduce(|| 0.0, |a, b| a + b), + ) // or sum() + } else { + None + } +} + + +pub fn ssqe_sequential(y: &[f32], y_predicted: &[f32]) -> Option { + if y.len() == y_predicted.len() { + let y_iter = y.iter(); + let y_pred_iter = y_predicted.iter(); + + Some( + y_iter + .zip(y_pred_iter) + .map(|(y, y_pred)| (y - y_pred).powi(2)) + .sum() + ) + } else { + None + } +} + + +pub fn seq_count_alpha_nums(corpus: &str) -> usize { + corpus.chars().filter(|c| c.is_alphanumeric()).count() +} + + +pub fn par_count_alpha_nums(corpus: &str) -> usize { + corpus.par_chars().filter(|c| c.is_alphanumeric()).count() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_sum_of_sq_errors() { + assert_eq!( + ssqe(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + assert_eq!( + ssqe(&[-1.0, -1.0, -1.0, -1.0], &[-2.0, -2.0, -2.0, -2.0]), + Some(4.0) + ); + assert_eq!( + ssqe(&[-1.0, -1.0, -1.0, -1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(36.0) + ); + assert_eq!( + ssqe(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + assert_eq!( + ssqe(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + } + + + #[test] + fn test_sum_of_sq_errors_seq() { + assert_eq!( + ssqe_sequential(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + assert_eq!( + ssqe_sequential(&[-1.0, -1.0, -1.0, -1.0], &[-2.0, -2.0, -2.0, -2.0]), + Some(4.0) + ); + assert_eq!( + ssqe_sequential(&[-1.0, -1.0, -1.0, -1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(36.0) + ); + assert_eq!( + ssqe_sequential(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + assert_eq!( + ssqe_sequential(&[1.0, 1.0, 1.0, 1.0], &[2.0, 2.0, 2.0, 2.0]), + Some(4.0) + ); + } +} diff --git a/Chapter04/immutable-states/Cargo.toml b/Chapter04/immutable-states/Cargo.toml new file mode 100644 index 0000000..a6a5290 --- /dev/null +++ b/Chapter04/immutable-states/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "immutable-states" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter04/immutable-states/src/main.rs b/Chapter04/immutable-states/src/main.rs new file mode 100644 index 0000000..71de970 --- /dev/null +++ b/Chapter04/immutable-states/src/main.rs @@ -0,0 +1,29 @@ +use std::thread; +use std::rc::Rc; +use std::sync::Arc; +use std::sync::mpsc::channel; + + +fn noop(_: T) {} + +fn main() { + let (sender, receiver) = channel::(); + + thread::spawn(move || { + let thread_local_read_only_clone = sender.clone(); + noop(thread_local_read_only_clone); + }); + + + let b = Arc::new(Rc::new(vec![])); + thread::spawn(move || { + let thread_local_read_only_clone = b.clone(); + noop(thread_local_read_only_clone); + }); + /* This won't compile: + + let c = Arc::new(receiver); + thread::spawn(move || { + noop(c.clone()); + });*/ +} \ No newline at end of file diff --git a/Chapter04/libsample_lib.rlib b/Chapter04/libsample_lib.rlib deleted file mode 100644 index d91a050..0000000 Binary files a/Chapter04/libsample_lib.rlib and /dev/null differ diff --git a/Chapter04/multiple-threads/Cargo.toml b/Chapter04/multiple-threads/Cargo.toml new file mode 100644 index 0000000..6727804 --- /dev/null +++ b/Chapter04/multiple-threads/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "multiple-threads" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter04/multiple-threads/src/main.rs b/Chapter04/multiple-threads/src/main.rs new file mode 100644 index 0000000..e2052e3 --- /dev/null +++ b/Chapter04/multiple-threads/src/main.rs @@ -0,0 +1,29 @@ +use std::thread; + + +/// +/// Doubles each element in the provided chunks in parallel and returns the results. +/// +fn parallel_map(data: Vec>) -> Vec>> { + data.into_iter() + .map(|chunk| thread::spawn(move || chunk.into_iter().map(|c| c * 2).collect())) + .collect() +} + +fn main() { + + // Prepare chunked data + let data = vec![vec![1, 2, 3], vec![4, 4, 5], vec![6, 7, 7]]; + + // work on the data in parallel + let results: Vec = parallel_map(data.clone()) + .into_iter() // an owned iterator over the results + .flat_map(|thread| thread.join().unwrap()) // join each thread + .collect(); // collect the results into a Vec + + // flatten the original data structure + let data: Vec = data.into_iter().flat_map(|e| e).collect(); + + // print the results + println!("{:?} -> {:?}", data, results); +} diff --git a/Chapter04/sample_access b/Chapter04/sample_access deleted file mode 100644 index 47a4ac8..0000000 Binary files a/Chapter04/sample_access and /dev/null differ diff --git a/Chapter04/sample_access.rs b/Chapter04/sample_access.rs deleted file mode 100644 index 79efb93..0000000 --- a/Chapter04/sample_access.rs +++ /dev/null @@ -1,59 +0,0 @@ -//-- ######################### -//-- Task: To create a sample module to illustrating `self` and `super` -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -fn sample_function() { - println!("called `sample_function()`"); -} - -// Defined a module names cool -mod cool { - pub fn sample_function() { - println!("called `cool::sample_function()` \n"); - } -} - -mod sample_mod { - fn sample_function() { - println!("called `sample_mod::sample_function()` \n"); - } - - mod cool { - pub fn sample_function() { - println!("called `sample_mod::cool::sample_function()` \n"); - } - } - - pub fn indirect_call() { - // Let's access all the sample_functions named `sample_function` from this scope! - print!("called `sample_mod::indirect_call()`, that\n> "); - - // The `self` keyword refers to the current module scope - in this case `sample_mod`. - // Calling `self::sample_function()` and calling `sample_function()` directly both give - // the same result, because they refer to the same sample_function. - self::sample_function(); - sample_function(); - - // We can also use `self` to access another module inside `sample_mod`: - self::cool::sample_function(); - - // The `super` keyword refers to the parent scope (outside the `sample_mod` module). - super::sample_function(); - - // This will bind to the `cool::sample_function` in the *crate* scope. - // In this case the crate scope is the outermost scope. - { - use cool::sample_function as root_sample_function; - root_sample_function(); - } - } -} - -// Execution starts here -fn main() { - // Calling the sample_mod module's item - sample_mod::indirect_call(); -} \ No newline at end of file diff --git a/Chapter04/sample_control b/Chapter04/sample_control deleted file mode 100644 index 4fa205b..0000000 Binary files a/Chapter04/sample_control and /dev/null differ diff --git a/Chapter04/sample_control.rs b/Chapter04/sample_control.rs deleted file mode 100644 index 2ee4313..0000000 --- a/Chapter04/sample_control.rs +++ /dev/null @@ -1,41 +0,0 @@ -//-- ######################### -//-- Task: To create a sample module to illustrating `use` -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Bind the `deeply::nested::function` path to `other_function`. -use deeply::nested::sample_function as other_function; - -// Defined a nested -mod deeply { - pub mod nested { - pub fn sample_function() { - println!("called `deeply::nested::function()` \n") - } - } -} - -fn sample_function() { - println!("called `function()` \n"); -} - -fn main() { - // Easier access to `deeply::nested::function` - other_function(); - - println!("Entering a block \n"); - { - // This is equivalent to `use deeply::nested::sample_function as sample_function`. - // This `sample_function()` will shadow the outer one. - use deeply::nested::sample_function; - sample_function(); - - // `use` bindings have a local scope. In this case, the - // shadowing of `function()` is only in this block. - println!("Leaving the block \n"); - } - - sample_function(); -} \ No newline at end of file diff --git a/Chapter04/sample_exec b/Chapter04/sample_exec deleted file mode 100644 index e4a9e13..0000000 Binary files a/Chapter04/sample_exec and /dev/null differ diff --git a/Chapter04/sample_exec.rs b/Chapter04/sample_exec.rs deleted file mode 100644 index 52427f6..0000000 --- a/Chapter04/sample_exec.rs +++ /dev/null @@ -1,16 +0,0 @@ -//-- ######################### -//-- Task: To create a sample executor of sample_lib in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Imports all items under sample_lib -extern crate sample_lib; - -fn main() { - // Calling public_function - sample_lib::public_function(); - // Calling indirect_access to private_function - sample_lib::indirect_access(); -} \ No newline at end of file diff --git a/Chapter04/sample_lib.rs b/Chapter04/sample_lib.rs deleted file mode 100644 index 1a3861e..0000000 --- a/Chapter04/sample_lib.rs +++ /dev/null @@ -1,20 +0,0 @@ -//-- ######################### -//-- Task: To create a sample library in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -pub fn public_function() { - println!("called sample_lib `public_function()`"); -} - -fn private_function() { - println!("called sample_lib `private_function()`"); -} - -pub fn indirect_access() { - print!("called sample_lib `indirect_access()`, that\n> "); - - private_function(); -} \ No newline at end of file diff --git a/Chapter04/sample_mod b/Chapter04/sample_mod deleted file mode 100644 index 074cb6d..0000000 Binary files a/Chapter04/sample_mod and /dev/null differ diff --git a/Chapter04/sample_mod.rs b/Chapter04/sample_mod.rs deleted file mode 100644 index bd31ac1..0000000 --- a/Chapter04/sample_mod.rs +++ /dev/null @@ -1,45 +0,0 @@ -//-- ######################### -//-- Task: To create a sample module to illustrate how to use a module in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Defined module named `sample_mod` -mod sample_mod { - // By default all the items in module have private visibility - fn private_function() { - println!("called `sample_mod::private_function()` \n"); - } - - // Using the `pub` keyword changes it visibility to public - pub fn sample_function() { - println!("called `sample_mod::sample_function()` \n"); - } - - // Public items of the module can access the private visible items - pub fn indirect_private_fn() { - print!("called `sample_mod::indirect_access()`, that\n> "); - private_function(); - } -} - -// Created a sample function to illustrate calling of -fn sample_function() { - println!("Called the `sample_function()` which is not a part of mod `sample_mod` \n"); -} - -// Execution of the program starts from here -fn main() { - // Calling the sample_function which is outside module - sample_function(); - // Calling the public visible sample_mod's sample_function - sample_mod::sample_function(); - - // Accessing the private fucntion indirectly - sample_mod::indirect_private_fn(); - - // Error! `private_function` is private - //sample_mod::private_function(); - // TODO ^ Try uncommenting this line -} \ No newline at end of file diff --git a/Chapter04/sample_module/mod.rs b/Chapter04/sample_module/mod.rs deleted file mode 100644 index a2bc12c..0000000 --- a/Chapter04/sample_module/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -//-- ######################### -//-- Task: To create a sample file structure -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Similarly `mod sample_private` and `mod nested_mod` will locate the `nested_mod.rs` -// and `sample_private.rs` files and insert them here under their respective -// modules -mod sample_private; -pub mod nested_mod; - -pub fn sample_function() { - println!("called `sample_module::sample_function()`"); -} - -fn private_function() { - println!("called `sample_module::private_function()`"); -} - -pub fn indirect_access() { - print!("called `sample_module::indirect_access()`, that\n> "); - - private_function(); -} diff --git a/Chapter04/sample_module/nested_mod.rs b/Chapter04/sample_module/nested_mod.rs deleted file mode 100644 index 4f60a53..0000000 --- a/Chapter04/sample_module/nested_mod.rs +++ /dev/null @@ -1,16 +0,0 @@ -//-- ######################### -//-- Task: Nested module -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// sample_mod/nested.rs -pub fn sample_function() { - println!("called `sample_module::nested::sample_function()`"); -} - -#[allow(dead_code)] -fn private_function() { - println!("called `my::nested::private_function()`"); -} \ No newline at end of file diff --git a/Chapter04/sample_module/sample_private.rs b/Chapter04/sample_module/sample_private.rs deleted file mode 100644 index 3fc0381..0000000 --- a/Chapter04/sample_module/sample_private.rs +++ /dev/null @@ -1,11 +0,0 @@ -//-- ######################### -//-- Task: Inaccessible script -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -#[allow(dead_code)] -pub fn public_function() { - println!("called `sample_module::sample_private::public_function()`"); -} \ No newline at end of file diff --git a/Chapter04/sample_nested b/Chapter04/sample_nested deleted file mode 100644 index b6a8d7a..0000000 Binary files a/Chapter04/sample_nested and /dev/null differ diff --git a/Chapter04/sample_nested.rs b/Chapter04/sample_nested.rs deleted file mode 100644 index c110405..0000000 --- a/Chapter04/sample_nested.rs +++ /dev/null @@ -1,46 +0,0 @@ -//-- ######################### -//-- Task: To create a sample nested_mod module -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Defined module named `sample_mod` -mod sample_mod { - - // Defined public Nested module named `nested_mod` - pub mod nested_mod { - pub fn function() { - println!("called `sample_mod::nested_mod::function()`"); - } - - #[allow(dead_code)] - fn private_function() { - println!("called `sample_mod::nested_mod::private_function()`"); - } - } - - // Nested modules follow the same rules for visibility - mod private_nested_mod { - #[allow(dead_code)] - pub fn function() { - println!("called `sample_mod::private_nested_mod::function()`"); - } - } -} - -// Execution starts from main function -fn main() { - - sample_mod::nested_mod::function(); - - // Private items of a module cannot be directly accessed, even if nested_mod in a public module - - // Error! `private_function` is private - //sample_mod::nested_mod::private_function(); - // TODO ^ Try uncommenting this line - - // Error! `private_nested_mod` is a private module - //sample_mod::private_nested_mod::function(); - // TODO ^ Try uncommenting this line -} \ No newline at end of file diff --git a/Chapter04/sample_split b/Chapter04/sample_split deleted file mode 100644 index 989197a..0000000 Binary files a/Chapter04/sample_split and /dev/null differ diff --git a/Chapter04/sample_split.rs b/Chapter04/sample_split.rs deleted file mode 100644 index ede58d7..0000000 --- a/Chapter04/sample_split.rs +++ /dev/null @@ -1,25 +0,0 @@ -//-- ######################### -//-- Task: To create a sample file structure -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Using the contents of sample_module -mod sample_module; - -// Defining a local sample_function -fn sample_function() { - println!("called `sample_function()`"); -} - -// Execution starts here -fn main() { - sample_module::sample_function(); - - sample_function(); - - sample_module::indirect_access(); - - sample_module::nested_mod::sample_function(); -} \ No newline at end of file diff --git a/Chapter04/sample_struct b/Chapter04/sample_struct deleted file mode 100644 index 139adaf..0000000 Binary files a/Chapter04/sample_struct and /dev/null differ diff --git a/Chapter04/sample_struct.rs b/Chapter04/sample_struct.rs deleted file mode 100644 index 95f24b2..0000000 --- a/Chapter04/sample_struct.rs +++ /dev/null @@ -1,52 +0,0 @@ -//-- ######################### -//-- Task: To create a sample nested_mod module -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 4 March 17 -//-- ######################### - -// Sample module which has struct item -mod sample_struct { - // A public struct with a public field of generic type `T` - pub struct WhiteBox { - pub information: T, - } - - // A public struct with a private field of generic type `T` - #[allow(dead_code)] - pub struct BlackBox { - information: T, - } - - impl BlackBox { - // A public constructor method - pub fn const_new(information: T) -> BlackBox { - BlackBox { - information: information, - } - } - } -} - -// Execution starts here -fn main() { - // Public structs with public fields can be constructed as usual - let white_box = sample_struct::WhiteBox { information: "public information \n" }; - - // and their fields can be normally accessed. - println!("The white box contains: {} \n", white_box.information); - - // Public structs with private fields cannot be constructed using field names. - // Error! `BlackBox` has private fields - //let black_box = sample_struct::BlackBox { information: "classified information" }; - // TODO ^ Try uncommenting this line - - // However, structs with private fields can be created using - // public constructors - let _black_box = sample_struct::BlackBox::const_new("classified information \n"); - - // and the private fields of a public struct cannot be accessed. - // Error! The `information` field is private - //println!("The black box contains: {}", _black_box.information); - // TODO ^ Try uncommenting this line -} \ No newline at end of file diff --git a/Chapter04/simple-threads/Cargo.toml b/Chapter04/simple-threads/Cargo.toml new file mode 100644 index 0000000..546954e --- /dev/null +++ b/Chapter04/simple-threads/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "simple-threads" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter04/simple-threads/src/main.rs b/Chapter04/simple-threads/src/main.rs new file mode 100644 index 0000000..40b8277 --- /dev/null +++ b/Chapter04/simple-threads/src/main.rs @@ -0,0 +1,51 @@ +use std::thread; +use std::time::Duration; + +/// +/// Starts a thread that waits for 3 seconds before returning. Prints stuff. +/// +fn start_no_shared_data_thread() -> thread::JoinHandle<()> { + thread::spawn(|| { + // since we are not using a parent scope variable in here + // no move is required + println!("Waiting for three seconds."); + thread::sleep(Duration::from_secs(3)); + println!("Done") + }) +} + + +/// +/// Starts a thread moving the function's input parameters +/// +fn start_shared_data_thread(a_number: i32, a_vec: Vec) -> thread::JoinHandle> { + thread::spawn(move || { + // thread::spawn(|| { + print!(" a_vec ---> ["); + for i in a_vec.iter() { + print!(" {} ", i); + } + println!("]"); + println!(" A number from inside the thread: {}", a_number); + a_vec // let's return ownership + }) +} + +fn main() { + let no_move_thread = start_no_shared_data_thread(); + + // do some work in between + for _ in 0..10 { + print!(":"); + } + + println!("Waiting for the thread to finish ... {:?}", no_move_thread.join()); + + let a_number = 42; + let a_vec = vec![1,2,3,4,5]; + + let move_thread = start_shared_data_thread(a_number, a_vec); + + println!("We can still use a Copy-enabled type: {}", a_number); + println!("Waiting for the thread to finish ... {:?}", move_thread.join()); +} \ No newline at end of file diff --git a/Chapter04/use-rayon/Cargo.toml b/Chapter04/use-rayon/Cargo.toml new file mode 100644 index 0000000..30afa44 --- /dev/null +++ b/Chapter04/use-rayon/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "use-rayon" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +rayon = "1.0.3" + + +[dev-dependencies] +criterion = "0.2.11" +rand = "^0.5" + + +[[bench]] +name = "seq_vs_par" +harness = false \ No newline at end of file diff --git a/Chapter04/use-rayon/benches/seq_vs_par.rs b/Chapter04/use-rayon/benches/seq_vs_par.rs new file mode 100644 index 0000000..313d8b1 --- /dev/null +++ b/Chapter04/use-rayon/benches/seq_vs_par.rs @@ -0,0 +1,31 @@ +#[macro_use] +extern crate criterion; +use criterion::black_box; +use criterion::Criterion; +use rand::prelude::*; +use std::cell::RefCell; +use use_rayon::{merge_sort_par, merge_sort_seq}; + +fn random_number_vec(size: usize) -> Vec { + let mut v: Vec = (0..size as i64).collect(); + let mut rng = thread_rng(); + rng.shuffle(&mut v); + v +} + +thread_local!(static ITEMS: RefCell> = RefCell::new(random_number_vec(100_000))); + +fn bench_seq(c: &mut Criterion) { + c.bench_function("10k merge sort (sequential)", |b| { + ITEMS.with(|item| b.iter(|| black_box(merge_sort_seq(&item.borrow())))); + }); +} + +fn bench_par(c: &mut Criterion) { + c.bench_function("10k merge sort (parallel)", |b| { + ITEMS.with(|item| b.iter(|| black_box(merge_sort_par(&item.borrow())))); + }); +} +criterion_group!(benches, bench_seq, bench_par); + +criterion_main!(benches); diff --git a/Chapter04/use-rayon/src/lib.rs b/Chapter04/use-rayon/src/lib.rs new file mode 100644 index 0000000..44a14e1 --- /dev/null +++ b/Chapter04/use-rayon/src/lib.rs @@ -0,0 +1,82 @@ +use rayon; + +/// +/// Merges two collections into one. +/// +fn sorted_merge(sorted_l: Vec, sorted_r: Vec) -> Vec { + let mut result: Vec = vec![Default::default(); sorted_l.len() + sorted_r.len()]; + + let (mut i, mut j) = (0, 0); + let mut k = 0; + while i < sorted_l.len() && j < sorted_r.len() { + if sorted_l[i] <= sorted_r[j] { + result[k] = sorted_l[i].clone(); + i += 1; + } else { + result[k] = sorted_r[j].clone(); + j += 1; + } + k += 1; + } + while i < sorted_l.len() { + result[k] = sorted_l[i].clone(); + k += 1; + i += 1; + } + + while j < sorted_r.len() { + result[k] = sorted_r[j].clone(); + k += 1; + j += 1; + } + result +} + +/// +/// Merge sort implementation using parallelism. +/// +pub fn merge_sort_par(collection: &[T]) -> Vec +where + T: PartialOrd + Clone + Default + Send + Sync, +{ + if collection.len() > 1 { + let (l, r) = collection.split_at(collection.len() / 2); + let (sorted_l, sorted_r) = rayon::join(|| merge_sort_par(l), || merge_sort_par(r)); + sorted_merge(sorted_l, sorted_r) + } else { + collection.to_vec() + } +} + + +/// +/// Regular, sequential merge sort implementation +/// +pub fn merge_sort_seq(collection: &[T]) -> Vec { + if collection.len() > 1 { + let (l, r) = collection.split_at(collection.len() / 2); + let (sorted_l, sorted_r) = (merge_sort_seq(l), merge_sort_seq(r)); + sorted_merge(sorted_l, sorted_r) + } else { + collection.to_vec() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_merge_sort_seq() { + assert_eq!(merge_sort_seq(&vec![9, 8, 7, 6]), vec![6, 7, 8, 9]); + assert_eq!(merge_sort_seq(&vec![6, 8, 7, 9]), vec![6, 7, 8, 9]); + assert_eq!(merge_sort_seq(&vec![2, 1, 1, 1, 1]), vec![1, 1, 1, 1, 2]); + } + + #[test] + fn test_merge_sort_par() { + assert_eq!(merge_sort_par(&vec![9, 8, 7, 6]), vec![6, 7, 8, 9]); + assert_eq!(merge_sort_par(&vec![6, 8, 7, 9]), vec![6, 7, 8, 9]); + assert_eq!(merge_sort_par(&vec![2, 1, 1, 1, 1]), vec![1, 1, 1, 1, 2]); + } +} diff --git a/Chapter05/custom-errors/Cargo.toml b/Chapter05/custom-errors/Cargo.toml new file mode 100644 index 0000000..ec569e7 --- /dev/null +++ b/Chapter05/custom-errors/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "custom-errors" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/custom-errors/src/main.rs b/Chapter05/custom-errors/src/main.rs new file mode 100644 index 0000000..92b9270 --- /dev/null +++ b/Chapter05/custom-errors/src/main.rs @@ -0,0 +1,26 @@ +use std::fmt; +use std::error::Error; + +#[derive(Debug)] +pub struct MyError { + code: usize, +} + +impl Error for MyError { + fn description(&self) -> &str { + "Occurs when someone makes a mistake" + } +} + +impl fmt::Display for MyError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "Error code {:#X}", self.code) + } +} + + +fn main() { + println!("Display: {}", MyError{ code: 1535 }); + println!("Debug: {:?}", MyError{ code: 42 }); + println!("Description: {:?}", (MyError{ code: 42 }).description()); +} \ No newline at end of file diff --git a/Chapter05/exceptional-results/Cargo.toml b/Chapter05/exceptional-results/Cargo.toml new file mode 100644 index 0000000..215effa --- /dev/null +++ b/Chapter05/exceptional-results/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "exceptional-results" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/exceptional-results/src/lib.rs b/Chapter05/exceptional-results/src/lib.rs new file mode 100644 index 0000000..97047fa --- /dev/null +++ b/Chapter05/exceptional-results/src/lib.rs @@ -0,0 +1,64 @@ + +/// +/// Finds a needle in a haystack, returns -1 on error +/// +pub fn bad_practice_find(needle: &str, haystack: &str) -> i32 { + haystack.find(needle).map(|p| p as i32).unwrap_or(-1) +} + +/// +/// Finds a needle in a haystack, returns None on error +/// +pub fn better_find(needle: &str, haystack: &str) -> Option { + haystack.find(needle) +} + +#[derive(Debug, PartialEq)] +pub enum FindError { + EmptyNeedle, + EmptyHaystack, + NotFound, +} + +/// +/// Finds a needle in a haystack, returns a proper Result +/// +pub fn best_find(needle: &str, haystack: &str) -> Result { + if needle.len() <= 0 { + Err(FindError::EmptyNeedle) + } else if haystack.len() <= 0 { + Err(FindError::EmptyHaystack) + } else { + haystack.find(needle).map_or(Err(FindError::NotFound), |n| Ok(n)) + } +} + +#[cfg(test)] +mod tests { + + use super::*; + + #[test] + fn test_bad_practice() { + assert_eq!(bad_practice_find("a", "hello world"), -1); + assert_eq!(bad_practice_find("e", "hello world"), 1); + assert_eq!(bad_practice_find("", "hello world"), 0); + assert_eq!(bad_practice_find("a", ""), -1); + } + + #[test] + fn test_better_practice() { + assert_eq!(better_find("a", "hello world"), None); + assert_eq!(better_find("e", "hello world"), Some(1)); + assert_eq!(better_find("", "hello world"), Some(0)); + assert_eq!(better_find("a", ""), None); + } + + #[test] + fn test_best_practice() { + assert_eq!(best_find("a", "hello world"), Err(FindError::NotFound)); + assert_eq!(best_find("e", "hello world"), Ok(1)); + assert_eq!(best_find("", "hello world"), Err(FindError::EmptyNeedle)); + assert_eq!(best_find("e", ""), Err(FindError::EmptyHaystack)); + } +} diff --git a/Chapter05/external-crates/Cargo.toml b/Chapter05/external-crates/Cargo.toml new file mode 100644 index 0000000..f25526f --- /dev/null +++ b/Chapter05/external-crates/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "external-crates" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] +quick-error = "1.2" \ No newline at end of file diff --git a/Chapter05/external-crates/src/main.rs b/Chapter05/external-crates/src/main.rs new file mode 100644 index 0000000..17dd0b6 --- /dev/null +++ b/Chapter05/external-crates/src/main.rs @@ -0,0 +1,38 @@ +#[macro_use] extern crate quick_error; + +use std::convert::From; +use std::io; +use std::error::Error; + +quick_error! { + #[derive(Debug)] + pub enum ErrorWrapper { + /// + /// + /// + InvalidDeviceIdError(device_id: usize) { + from(device_id: usize) -> (device_id) + description("No device present with this id, check formatting.") + } + + DeviceNotPresentError(device_id: usize) { + display("Device with id \"{}\" not found", device_id) + } + + UnexpectedDeviceStateError {} + + Io(err: io::Error) { + from(kind: io::ErrorKind) -> (io::Error::from(kind)) + description(err.description()) + display("I/O Error: {}", err) + } + } +} + + +fn main() { + println!("(IOError) {}", ErrorWrapper::from(io::ErrorKind::InvalidData)); + println!("(InvalidDeviceIdError) {}", ErrorWrapper::InvalidDeviceIdError(42)); + println!("(DeviceNotPresentError) {}", ErrorWrapper::DeviceNotPresentError(42)); + println!("(UnexpectedDeviceStateError) {}", ErrorWrapper::UnexpectedDeviceStateError {}); +} diff --git a/Chapter05/multiple-errors/Cargo.toml b/Chapter05/multiple-errors/Cargo.toml new file mode 100644 index 0000000..e71b9b9 --- /dev/null +++ b/Chapter05/multiple-errors/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "multiple-errors" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/multiple-errors/src/main.rs b/Chapter05/multiple-errors/src/main.rs new file mode 100644 index 0000000..83fb886 --- /dev/null +++ b/Chapter05/multiple-errors/src/main.rs @@ -0,0 +1,47 @@ +use std::fmt; +use std::io; +use std::error::Error; + +#[derive(Debug)] +pub struct InvalidDeviceIdError(usize); +#[derive(Debug)] +pub struct DeviceNotPresentError(usize); +#[derive(Debug)] +pub struct UnexpectedDeviceStateError {} + +#[derive(Debug)] +pub enum ErrorWrapper { + Io(io::Error), + Db(InvalidDeviceIdError), + Device(DeviceNotPresentError), + Agent(UnexpectedDeviceStateError) +} + +impl Error for ErrorWrapper { + fn description(&self) -> &str { + match *self { + ErrorWrapper::Io(ref e) => e.description(), + ErrorWrapper::Db(_) | ErrorWrapper::Device(_) => "No device present with this id, check formatting.", + _ => "Unexpected error. Sorry for the inconvenience." + } + } +} + +impl fmt::Display for ErrorWrapper { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match *self { + ErrorWrapper::Io(ref e) => write!(f, "{} [{}]", e, self.description()), + ErrorWrapper::Db(ref e) => write!(f, "Device with id \"{}\" not found [{}]", e.0, self.description()), + ErrorWrapper::Device(ref e) => write!(f, "Device with id \"{}\" is currently unavailable [{}]", e.0, self.description()), + ErrorWrapper::Agent(_) => write!(f, "Unexpected device state [{}]", self.description()) + } + } +} + + +fn main() { + println!("{}", ErrorWrapper::Io(io::Error::from(io::ErrorKind::InvalidData))); + println!("{}", ErrorWrapper::Db(InvalidDeviceIdError(42))); + println!("{}", ErrorWrapper::Device(DeviceNotPresentError(42))); + println!("{}", ErrorWrapper::Agent(UnexpectedDeviceStateError {})); +} \ No newline at end of file diff --git a/Chapter05/options-results/Cargo.toml b/Chapter05/options-results/Cargo.toml new file mode 100644 index 0000000..74ec708 --- /dev/null +++ b/Chapter05/options-results/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "options-results" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/options-results/src/lib.rs b/Chapter05/options-results/src/lib.rs new file mode 100644 index 0000000..5e270b3 --- /dev/null +++ b/Chapter05/options-results/src/lib.rs @@ -0,0 +1,37 @@ +#[cfg(test)] +mod tests { + + #[derive(Debug, Eq, PartialEq, Copy, Clone)] + struct MyError; + + #[test] + fn transposing() { + let this: Result, MyError> = Ok(Some(42)); + let other: Option> = Some(Ok(42)); + assert_eq!(this, other.transpose()); + + let this: Result, MyError> = Err(MyError); + let other: Option> = Some(Err(MyError)); + assert_eq!(this, other.transpose()); + + assert_eq!(None::>.transpose(), Ok(None::)); + } + + + #[test] + fn conversion() { + let opt = Some(42); + assert_eq!(opt.ok_or(MyError), Ok(42)); + + let res: Result = Ok(42); + assert_eq!(res.ok(), opt); + assert_eq!(res.err(), None); + + let opt: Option = None; + assert_eq!(opt.ok_or(MyError), Err(MyError)); + + let res: Result = Err(MyError); + assert_eq!(res.ok(), None); + assert_eq!(res.err(), Some(MyError)); + } +} diff --git a/Chapter05/panicking-responsibly/Cargo.toml b/Chapter05/panicking-responsibly/Cargo.toml new file mode 100644 index 0000000..d55fba7 --- /dev/null +++ b/Chapter05/panicking-responsibly/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "panicking-responsibly" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/panicking-responsibly/src/lib.rs b/Chapter05/panicking-responsibly/src/lib.rs new file mode 100644 index 0000000..5aea068 --- /dev/null +++ b/Chapter05/panicking-responsibly/src/lib.rs @@ -0,0 +1,61 @@ +#[cfg(test)] +mod tests { + + #[test] + #[should_panic] + fn test_regular_panic() { + panic!(); + } + + #[test] + #[should_panic(expected = "Everything is lost!")] + fn test_panic_message() { + panic!("Everything is lost!"); + } + + #[test] + #[should_panic(expected = "String formatting also works")] + fn test_panic_format() { + panic!("{} formatting also works.", "String"); + } + + #[test] + #[should_panic] + fn test_panic_return_value() { + panic!(42); + } + + #[test] + #[should_panic] + fn test_assert() { + // assert a condition and panic if it's not met + assert!(1 == 2); + } + + #[test] + #[should_panic] + fn test_assert_eq() { + // assert a condition and panic if it's not met + assert_eq!(1, 2); + } + + #[test] + #[should_panic] + fn test_assert_neq() { + // assert a condition and panic if it's not met + assert_ne!(1, 1); + } + + #[test] + #[should_panic] + fn test_unwrap() { + // panics if "None" + None::.unwrap(); + } + + #[test] + #[should_panic(expected = "Unwrap with a message")] + fn test_expect() { + None::.expect("Unwrap with a message"); + } +} diff --git a/Chapter05/resilient-programming/Cargo.toml b/Chapter05/resilient-programming/Cargo.toml new file mode 100644 index 0000000..f782ead --- /dev/null +++ b/Chapter05/resilient-programming/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "resilient-programming" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/resilient-programming/src/main.rs b/Chapter05/resilient-programming/src/main.rs new file mode 100644 index 0000000..eba8f7c --- /dev/null +++ b/Chapter05/resilient-programming/src/main.rs @@ -0,0 +1,17 @@ +use std::fs; +use std::io; + +fn print_file_contents_qm(filename: &str) -> Result<(), io::Error> { + let contents = fs::read_to_string(filename)?; + println!("File contents, external fn: {:?}", contents); + Ok(()) +} + +fn main() -> Result<(), std::io::Error> { + println!("Ok: {:?}", print_file_contents_qm("testfile.txt")); + println!("Err: {:?}", print_file_contents_qm("not-a-file")); + + let contents = fs::read_to_string("testfile.txt")?; + println!("File contents, main fn: {:?}", contents); + Ok(()) +} diff --git a/Chapter05/resilient-programming/testfile.txt b/Chapter05/resilient-programming/testfile.txt new file mode 100644 index 0000000..c57eff5 --- /dev/null +++ b/Chapter05/resilient-programming/testfile.txt @@ -0,0 +1 @@ +Hello World! \ No newline at end of file diff --git a/Chapter05/sample_channel b/Chapter05/sample_channel deleted file mode 100644 index 1f50d76..0000000 Binary files a/Chapter05/sample_channel and /dev/null differ diff --git a/Chapter05/sample_channel.rs b/Chapter05/sample_channel.rs deleted file mode 100644 index 2e64b26..0000000 --- a/Chapter05/sample_channel.rs +++ /dev/null @@ -1,42 +0,0 @@ -//-- ######################### -//-- Task: Using channels to perform safe pass of data between threads -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Using standard libraries -use std::sync::mpsc::{Sender, Receiver}; -use std::sync::mpsc; -use std::thread; - -// Declaring number of threads -static NO_THREADS: i32 = 3; - -// Main thread starts -fn main() { - // Creating endpoints of the channel - let (tx, rx): (Sender, Receiver) = mpsc::channel(); - - for thread_id in 0..NO_THREADS { - // Cloing the Sender - let thread_tx = tx.clone(); - - // Sending threads via the channel - thread::spawn(move || { - // thread sends the message to the channel - thread_tx.send(thread_id).unwrap(); - println!("thread {} finished", thread_id); - }); - } - - // Collecting all the threads - let mut thread_holder = Vec::with_capacity(NO_THREADS as usize); - for _ in 0..NO_THREADS { - // Get the message from channel - thread_holder.push(rx.recv()); - } - - // Print the execution order - println!("{:?}", thread_holder); -} \ No newline at end of file diff --git a/Chapter05/sample_child_process b/Chapter05/sample_child_process deleted file mode 100644 index 7c41384..0000000 Binary files a/Chapter05/sample_child_process and /dev/null differ diff --git a/Chapter05/sample_child_process.rs b/Chapter05/sample_child_process.rs deleted file mode 100644 index 2119138..0000000 --- a/Chapter05/sample_child_process.rs +++ /dev/null @@ -1,30 +0,0 @@ -//-- ######################### -//-- Task: To call a child process -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Call the standard library -use std::process::Command; - -// Main execution of the code -fn main() { - // Command to be executed - let output = Command::new("rustc") - .arg("--version") - .output().unwrap_or_else(|e| { - panic!("failed to execute process: {}", e) - }); - - // printing the output values - if output.status.success() { - let s = String::from_utf8_lossy(&output.stdout); - - print!("rustc succeeded and stdout was:\n{}", s); - } else { - let s = String::from_utf8_lossy(&output.stderr); - - print!("rustc failed and stderr was:\n{}", s); - } -} \ No newline at end of file diff --git a/Chapter05/sample_lock b/Chapter05/sample_lock deleted file mode 100644 index 4c291a4..0000000 Binary files a/Chapter05/sample_lock and /dev/null differ diff --git a/Chapter05/sample_lock.rs b/Chapter05/sample_lock.rs deleted file mode 100644 index 2bd3bc2..0000000 --- a/Chapter05/sample_lock.rs +++ /dev/null @@ -1,30 +0,0 @@ -//-- ######################### -//-- Task: Safe Mutuable access across threads for preventing data races -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Call the standard library -use std::sync::{Arc, Mutex}; -use std::thread; -use std::time::Duration; - -// Main thread -fn main() { - // Declaring a Arc type data - let data = Arc::new(Mutex::new(vec![1, 2, 3])); - - // Creating 3 threads and implementing lock - for i in 0..3 { - let data = data.clone(); - thread::spawn(move || { - let mut data = data.lock().unwrap(); - data[0] += i; - println!("Thread id : {:?}",i ); - println!("Data value :{:?}", data[0]); - }); - } - - thread::sleep(Duration::from_millis(10)); -} \ No newline at end of file diff --git a/Chapter05/sample_move b/Chapter05/sample_move deleted file mode 100644 index f2c490b..0000000 Binary files a/Chapter05/sample_move and /dev/null differ diff --git a/Chapter05/sample_move.rs b/Chapter05/sample_move.rs deleted file mode 100644 index 361753a..0000000 --- a/Chapter05/sample_move.rs +++ /dev/null @@ -1,18 +0,0 @@ -//-- ######################### -//-- Task: Passing values to a thread in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -use std::thread; - -fn main() { - let x = 1; - - let handle = thread::spawn(move || { - (x) - }); - - println!("{:?}", handle.join().unwrap()); -} \ No newline at end of file diff --git a/Chapter05/sample_multiple_threads b/Chapter05/sample_multiple_threads deleted file mode 100644 index 0acfb99..0000000 Binary files a/Chapter05/sample_multiple_threads and /dev/null differ diff --git a/Chapter05/sample_multiple_threads.rs b/Chapter05/sample_multiple_threads.rs deleted file mode 100644 index 4077426..0000000 --- a/Chapter05/sample_multiple_threads.rs +++ /dev/null @@ -1,26 +0,0 @@ -//-- ######################### -//-- Task: Spawning multiple threads in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -use std::thread; - -fn main() { - thread::spawn(move || { - println!("Hello from spawned thread"); - }); - - let join_handle = thread::spawn(move || { - println!("Hello from second spawned thread"); - 17 - }); - - println!("Hello from the main thread"); - - match join_handle.join() { - Ok(x) => println!("Second spawned thread returned {}", x), - Err(_) => println!("Second spawned thread panicked") - } -} diff --git a/Chapter05/sample_rayon/Cargo.lock b/Chapter05/sample_rayon/Cargo.lock deleted file mode 100644 index 1984dac..0000000 --- a/Chapter05/sample_rayon/Cargo.lock +++ /dev/null @@ -1,53 +0,0 @@ -[root] -name = "sample_rayon" -version = "0.1.0" -dependencies = [ - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "deque" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num_cpus" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf" -"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" -"checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2" -"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" -"checksum rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50c575b58c2b109e2fbc181820cbe177474f35610ff9e357dc75f6bac854ffbf" diff --git a/Chapter05/sample_rayon/Cargo.toml b/Chapter05/sample_rayon/Cargo.toml deleted file mode 100644 index 5ed0608..0000000 --- a/Chapter05/sample_rayon/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "sample_rayon" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -rayon = "0.6.0" diff --git a/Chapter05/sample_rayon/_gitignore b/Chapter05/sample_rayon/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter05/sample_rayon/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter05/sample_rayon/src/main.rs b/Chapter05/sample_rayon/src/main.rs deleted file mode 100644 index dac3096..0000000 --- a/Chapter05/sample_rayon/src/main.rs +++ /dev/null @@ -1,27 +0,0 @@ -//-- ######################### -//-- Task: Making sequential code parallel -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Calling the rayon crate -extern crate rayon; -use rayon::prelude::*; - -// Sum of squares fucntion -fn sum_of_squares(input: &[i32]) -> i32 { - input.par_iter() - .map(|&i| i * i) - .sum() -} - -// Main execution of code -fn main() { - // Declaring a random variable of 10 - let rand_val = 10; - // Calling the method to get sum_of_squares - let sum_sq = sum_of_squares(&[rand_val]); - // Printing the result - println!("Sum of squares of {0} is {1}",rand_val,sum_sq); -} diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/dep-lib-deque b/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/dep-lib-deque deleted file mode 100644 index d73e781..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/dep-lib-deque and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque b/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque deleted file mode 100644 index f72dbef..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque +++ /dev/null @@ -1 +0,0 @@ -b03ada4e5c004965 \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque.json b/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque.json deleted file mode 100644 index 881611a..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/deque-100193e66551957c/lib-deque.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5832551974792730490,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.1"]},"features":"None","deps":[["rand v0.3.15",13162989792342000120]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/dep-lib-libc b/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/dep-lib-libc deleted file mode 100644 index 7984a3f..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/dep-lib-libc and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc b/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc deleted file mode 100644 index 5f965c8..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc +++ /dev/null @@ -1 +0,0 @@ -b6c5d7845b054268 \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc.json b/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc.json deleted file mode 100644 index b0d739f..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/libc-a334f4483f75c5ca/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":9925122911743768144,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.21"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/dep-lib-num_cpus b/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/dep-lib-num_cpus deleted file mode 100644 index e8e7f71..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus b/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus deleted file mode 100644 index cf3bfbf..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -5539b3f58a0e1412 \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus.json b/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus.json deleted file mode 100644 index 866908a..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/num_cpus-a3664e097d018601/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16904407577744629897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.3.0"]},"features":"None","deps":[["libc v0.2.21",7512573019036304822]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/dep-lib-rand b/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/dep-lib-rand deleted file mode 100644 index 542fed6..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/dep-lib-rand and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand b/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand deleted file mode 100644 index 82127b5..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand +++ /dev/null @@ -1 +0,0 @@ -f841a3c27955acb6 \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand.json b/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand.json deleted file mode 100644 index 39dab33..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/rand-00ce216d81d5bd28/lib-rand.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7274609723079586476,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.15"]},"features":"None","deps":[["libc v0.2.21",7512573019036304822]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/dep-lib-rayon b/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/dep-lib-rayon deleted file mode 100644 index ad895cc..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/dep-lib-rayon and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon b/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon deleted file mode 100644 index f452653..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon +++ /dev/null @@ -1 +0,0 @@ -9f673888562e0a1e \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon.json b/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon.json deleted file mode 100644 index acdbf49..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/rayon-208998d89f27c9c2/lib-rayon.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7173640590289498132,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.0"]},"features":"None","deps":[["deque v0.3.1",7298365067590515376],["libc v0.2.21",7512573019036304822],["num_cpus v1.3.0",1302682182207355221],["rand v0.3.15",13162989792342000120]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon b/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon deleted file mode 100644 index 5555c47..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon +++ /dev/null @@ -1 +0,0 @@ -910165f013b947bd \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon.json b/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon.json deleted file mode 100644 index 87360be..0000000 --- a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/bin-sample_rayon.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7866036011650458170,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1491199071,850857154],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,53,47,99,111,100,101,47,115,97,109,112,108,101,95,114,97,121,111,110,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,115,97,109,112,108,101,95,114,97,121,111,110,45,97,53,53,54,52,98,52,54,55,52,97,51,55,54,57,53,47,100,101,112,45,98,105,110,45,115,97,109,112,108,101,95,114,97,121,111,110]]},"features":"None","deps":[["rayon v0.6.0",2164593520092407711]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/dep-bin-sample_rayon b/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/dep-bin-sample_rayon deleted file mode 100644 index 63f036c..0000000 Binary files a/Chapter05/sample_rayon/target/debug/.fingerprint/sample_rayon-a5564b4674a37695/dep-bin-sample_rayon and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/deps/libdeque-82214e5f75d78bdf.rlib b/Chapter05/sample_rayon/target/debug/deps/libdeque-82214e5f75d78bdf.rlib deleted file mode 100644 index 4c4a147..0000000 Binary files a/Chapter05/sample_rayon/target/debug/deps/libdeque-82214e5f75d78bdf.rlib and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/deps/liblibc-1d4b292c3e055073.rlib b/Chapter05/sample_rayon/target/debug/deps/liblibc-1d4b292c3e055073.rlib deleted file mode 100644 index 2aa8585..0000000 Binary files a/Chapter05/sample_rayon/target/debug/deps/liblibc-1d4b292c3e055073.rlib and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/deps/libnum_cpus-2c16f3104e5429bb.rlib b/Chapter05/sample_rayon/target/debug/deps/libnum_cpus-2c16f3104e5429bb.rlib deleted file mode 100644 index 78d31e0..0000000 Binary files a/Chapter05/sample_rayon/target/debug/deps/libnum_cpus-2c16f3104e5429bb.rlib and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/deps/librand-8ea7d489d4a383a0.rlib b/Chapter05/sample_rayon/target/debug/deps/librand-8ea7d489d4a383a0.rlib deleted file mode 100644 index a520c57..0000000 Binary files a/Chapter05/sample_rayon/target/debug/deps/librand-8ea7d489d4a383a0.rlib and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/deps/librayon-ecad47f1e1ddbdc6.rlib b/Chapter05/sample_rayon/target/debug/deps/librayon-ecad47f1e1ddbdc6.rlib deleted file mode 100644 index 107de56..0000000 Binary files a/Chapter05/sample_rayon/target/debug/deps/librayon-ecad47f1e1ddbdc6.rlib and /dev/null differ diff --git a/Chapter05/sample_rayon/target/debug/sample_rayon b/Chapter05/sample_rayon/target/debug/sample_rayon deleted file mode 100644 index d75a291..0000000 Binary files a/Chapter05/sample_rayon/target/debug/sample_rayon and /dev/null differ diff --git a/Chapter05/sample_thread_expt b/Chapter05/sample_thread_expt deleted file mode 100644 index 270eac5..0000000 Binary files a/Chapter05/sample_thread_expt and /dev/null differ diff --git a/Chapter05/sample_thread_expt.rs b/Chapter05/sample_thread_expt.rs deleted file mode 100644 index 2cd4ce1..0000000 --- a/Chapter05/sample_thread_expt.rs +++ /dev/null @@ -1,33 +0,0 @@ -//-- ######################### -//-- Task: Spawning 10 threads in rust -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Using the standard thread crate -use std::thread; - -// -static NO_THREADS: i32 = 10; - -// Main thread starts here -fn main() { - // Make a mutable vector named thread_holder to hold the threads spawned - let mut thread_holder = vec![]; - - for i in 0..NO_THREADS { - // Spin up another thread - thread_holder.push(thread::spawn(move || { - println!("Thread number is {}", i); - i - })); - } - - println!("***************************"); - - for thread_elements in thread_holder { - // Wait for the thread to finish. Returns a result. - println!("Thread returned {:?}", thread_elements.join().unwrap()); - } -} \ No newline at end of file diff --git a/Chapter05/sample_wait b/Chapter05/sample_wait deleted file mode 100644 index cff6e98..0000000 Binary files a/Chapter05/sample_wait and /dev/null differ diff --git a/Chapter05/sample_wait.rs b/Chapter05/sample_wait.rs deleted file mode 100644 index d1a0aa7..0000000 --- a/Chapter05/sample_wait.rs +++ /dev/null @@ -1,23 +0,0 @@ -//-- ######################### -//-- Task: Waiting for a child process -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 19 March 17 -//-- ######################### - -// Calling the standard libraries -use std::process::Command; - -// Main execution starts here -fn main() { - // Creting a child process - let mut child = Command::new("sleep").arg("5").spawn().unwrap(); - - // Waiting for the child process to complete - let _result = child.wait().unwrap(); - // printing the status of child process - print!("Status if child process {} \n", _result); - - // Marking the end of the main funciton - println!("Reached end of main"); -} \ No newline at end of file diff --git a/Chapter05/seamless-errors/Cargo.toml b/Chapter05/seamless-errors/Cargo.toml new file mode 100644 index 0000000..b464c3d --- /dev/null +++ b/Chapter05/seamless-errors/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "seamless-errors" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +[dependencies] diff --git a/Chapter05/seamless-errors/src/lib.rs b/Chapter05/seamless-errors/src/lib.rs new file mode 100644 index 0000000..ced8341 --- /dev/null +++ b/Chapter05/seamless-errors/src/lib.rs @@ -0,0 +1,35 @@ + +#[cfg(test)] +mod tests { + + #[test] + fn positive_results() { + + let ok: Result = Ok(42); + + assert_eq!(ok.and_then(|r| Ok(r + 1)), Ok(43)); + assert_eq!(ok.map(|r| r + 1), Ok(43)); + + // Boolean operations with Results. Take a close look at what's returned + assert_eq!(ok.and(Ok(43)), Ok(43)); + let err: Result = Err(-42.0); + assert_eq!(ok.and(err), err); + assert_eq!(ok.or(err), ok); + } + + #[test] + fn negative_results() { + let err: Result = Err(-42.0); + let ok: Result = Ok(-41); + + assert_eq!(err.or_else(|r| Ok(r as i32 + 1)), ok); + assert_eq!(err.map(|r| r + 1), Err(-42.0)); + assert_eq!(err.map_err(|r| r + 1.0), Err(-41.0)); + + let err2: Result = Err(43.0); + let ok: Result = Ok(42); + assert_eq!(err.and(err2), err); + assert_eq!(err.and(ok), err); + assert_eq!(err.or(ok), ok); + } +} diff --git a/Chapter09/cross-compile/Cargo.toml b/Chapter09/cross-compile/Cargo.toml new file mode 100644 index 0000000..66be00c --- /dev/null +++ b/Chapter09/cross-compile/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "cross-compile" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/Chapter09/cross-compile/src/main.rs b/Chapter09/cross-compile/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/Chapter09/cross-compile/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/Chapter09/i2cdevice-drivers/Cargo.toml b/Chapter09/i2cdevice-drivers/Cargo.toml new file mode 100644 index 0000000..bcb6743 --- /dev/null +++ b/Chapter09/i2cdevice-drivers/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "i2cdevice-drivers" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/Chapter09/i2cdevice-drivers/src/main.rs b/Chapter09/i2cdevice-drivers/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/Chapter09/i2cdevice-drivers/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/Chapter09/nickel-demo/Cargo.lock b/Chapter09/nickel-demo/Cargo.lock deleted file mode 100644 index 976e3db..0000000 --- a/Chapter09/nickel-demo/Cargo.lock +++ /dev/null @@ -1,367 +0,0 @@ -[root] -name = "nickel-demo" -version = "0.1.0" -dependencies = [ - "nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mustache" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nickel" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "solicit" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unsafe-any" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fac05c29a9b1fe86c828ec974d6f027679576711a246711c476e548bf7d741" -"checksum nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14bdda46396b6447ae5f22b74296cb517d5c4659f31e3cfb5351bdd8e129791d" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Chapter09/nickel-demo/Cargo.toml b/Chapter09/nickel-demo/Cargo.toml deleted file mode 100644 index 463f556..0000000 --- a/Chapter09/nickel-demo/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "nickel-demo" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -nickel = "*" - diff --git a/Chapter09/nickel-demo/_gitignore b/Chapter09/nickel-demo/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter09/nickel-demo/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter09/nickel-demo/src/main.rs b/Chapter09/nickel-demo/src/main.rs deleted file mode 100644 index ee0b5ad..0000000 --- a/Chapter09/nickel-demo/src/main.rs +++ /dev/null @@ -1,22 +0,0 @@ -//-- ######################### -//-- Task: Starting a simple hello world nickel web app -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 20 April 17 -//-- ######################### - -#[macro_use] extern crate nickel; - -use nickel::Nickel; - -fn main() { - let mut server = Nickel::new(); - - server.utilize(router! { - get "**" => |_req, _res| { - "Hello world!" - } - }); - - server.listen("127.0.0.1:6767"); -} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick b/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick deleted file mode 100644 index d61b7e9..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick b/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick deleted file mode 100644 index 5aeb628..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick +++ /dev/null @@ -1 +0,0 @@ -ff77ee2a214fd8c5 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json b/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json deleted file mode 100644 index c298b69..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2822179955554191932,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.5.3"]},"features":"None","deps":[["memchr v0.1.11",14263844120805675548]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie b/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie deleted file mode 100644 index 459af62..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie b/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie deleted file mode 100644 index 8455bba..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie +++ /dev/null @@ -1 +0,0 @@ -6fcbd3f38f83ce7a \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json b/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json deleted file mode 100644 index 5edbfe7..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10286856033600787685,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["time v0.1.37",236147470200079797],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable b/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable deleted file mode 100644 index ce1cb0f..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable b/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable deleted file mode 100644 index 09b8c49..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable +++ /dev/null @@ -1 +0,0 @@ -a4d0cad3db7e1de5 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json b/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json deleted file mode 100644 index 8008d76..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17188910590859900981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack b/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack deleted file mode 100644 index 826ab25..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack b/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack deleted file mode 100644 index b5c272a..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack +++ /dev/null @@ -1 +0,0 @@ -ebafd0e385f8164b \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json b/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json deleted file mode 100644 index 75dc73c..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":873799879772923555,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse b/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse deleted file mode 100644 index 9bd36da..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse b/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse deleted file mode 100644 index f08625c..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse +++ /dev/null @@ -1 +0,0 @@ -3c62c08e1fc6a0d3 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json b/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json deleted file mode 100644 index 63de418..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5063047255701104738,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.2.2"]},"features":"Some([\"default\", \"std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper b/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper deleted file mode 100644 index cfa5861..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper b/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper deleted file mode 100644 index da41e9e..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper +++ /dev/null @@ -1 +0,0 @@ -31f83ac49baeb088 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json b/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json deleted file mode 100644 index 8cd46ca..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15235079123074667897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.18"]},"features":"None","deps":[["cookie v0.2.5",8849154972123908975],["httparse v1.2.2",15249406177117758012],["language-tags v0.2.2",10383946826862231348],["log v0.3.7",3152260632248025340],["mime v0.2.3",812930976970199887],["num_cpus v1.4.0",7343421697437563937],["rustc-serialize v0.3.24",12611385045515358938],["solicit v0.4.4",17718913522527762471],["time v0.1.37",236147470200079797],["traitobject v0.0.1",3259688158112296332],["typeable v0.1.2",12966317192245254067],["unicase v1.4.0",2706180945114115012],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna b/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna deleted file mode 100644 index 0e239ec..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna b/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna deleted file mode 100644 index 887f08b..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna +++ /dev/null @@ -1 +0,0 @@ -9b571f467a401ef8 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json b/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json deleted file mode 100644 index 0097822..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14198864472503947152,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929],["unicode-bidi v0.2.5",6644609036182733468],["unicode-normalization v0.1.4",11528125408958514853]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build deleted file mode 100644 index a7979d3..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build +++ /dev/null @@ -1 +0,0 @@ -d1a1cce467c66d55 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build deleted file mode 100644 index 83b5f95..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -1fafa3e3cb7e026f \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json deleted file mode 100644 index 785b445..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi-build v0.1.1",17837523682249557571]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json deleted file mode 100644 index 0bda9f1..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build deleted file mode 100644 index b37cb9e..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 deleted file mode 100644 index cc5a9d4..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 deleted file mode 100644 index 5e88577..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 +++ /dev/null @@ -1 +0,0 @@ -a4afa36e230ccdcf \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json b/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json deleted file mode 100644 index 93041d8..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6026625737212813429,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi v0.2.8",8159171814049759188]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags b/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags deleted file mode 100644 index f18e170..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags b/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags deleted file mode 100644 index dd3a9d5..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags +++ /dev/null @@ -1 +0,0 @@ -34ffaa5d9f301b90 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json b/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json deleted file mode 100644 index e3a75f1..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16334056662103425344,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static b/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static deleted file mode 100644 index c34d7c4..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static b/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static deleted file mode 100644 index 9e2e31a..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static +++ /dev/null @@ -1 +0,0 @@ -e6981f52e289ac1c \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json b/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json deleted file mode 100644 index ca22feb..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13219478138099434326,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.16"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc b/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc deleted file mode 100644 index 1d5d54f..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc b/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc deleted file mode 100644 index 27a7c75..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc +++ /dev/null @@ -1 +0,0 @@ -41f8f628ade49c0e \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json b/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json deleted file mode 100644 index a9c8264..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17209458132245061813,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.22"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log b/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log deleted file mode 100644 index 2933d27..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log b/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log deleted file mode 100644 index e9f3054..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log +++ /dev/null @@ -1 +0,0 @@ -fc8097f85714bf2b \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json b/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json deleted file mode 100644 index e7bcf33..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15770699670206912575,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.7"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches b/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches deleted file mode 100644 index 6a61869..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches b/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches deleted file mode 100644 index a533c1d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches +++ /dev/null @@ -1 +0,0 @@ -c11ce1bafbf7cb92 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json b/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json deleted file mode 100644 index 0c43998..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15153744203340605494,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr b/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr deleted file mode 100644 index ef78676..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr b/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr deleted file mode 100644 index e9cc30d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr +++ /dev/null @@ -1 +0,0 @@ -1c922aa0a75af3c5 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json b/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json deleted file mode 100644 index bc199cf..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15077895593472080321,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.11"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime b/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime deleted file mode 100644 index afdc457..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime b/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime deleted file mode 100644 index dca25c1..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime +++ /dev/null @@ -1 +0,0 @@ -4f53389d6a1c480b \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json b/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json deleted file mode 100644 index cc43eaa..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":735843728989024041,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier b/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier deleted file mode 100644 index c0b2023..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier b/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier deleted file mode 100644 index b04040a..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier +++ /dev/null @@ -1 +0,0 @@ -308e83cf450814c5 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json b/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json deleted file mode 100644 index 48afea1..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10119508123425398212,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache b/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache deleted file mode 100644 index d0f84b4..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache b/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache deleted file mode 100644 index dc45951..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache +++ /dev/null @@ -1 +0,0 @@ -d94dc9a0cd9e2df6 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json b/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json deleted file mode 100644 index b16f129..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14579009387232238119,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel deleted file mode 100644 index be69f0b..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel deleted file mode 100644 index 0e8ee4b..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel +++ /dev/null @@ -1 +0,0 @@ -af9ae5bd1846886a \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json deleted file mode 100644 index 0df8034..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15913000049418327393,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.0"]},"features":"None","deps":[["groupable v0.2.0",16509491291626328228],["hyper v0.9.18",9849564369094637617],["lazy_static v0.1.16",2066177934189631718],["log v0.3.7",3152260632248025340],["modifier v0.1.0",14200984620933287472],["mustache v0.6.3",17739009113285283289],["plugin v0.2.6",5955120726143030526],["regex v0.1.80",1873262728565708009],["rustc-serialize v0.3.24",12611385045515358938],["time v0.1.37",236147470200079797],["typemap v0.3.3",1976382929852212923],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo deleted file mode 100644 index b3e6d44..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo +++ /dev/null @@ -1 +0,0 @@ -e4cd8ece36db1397 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo.json b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo.json deleted file mode 100644 index 814d132..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/bin-nickel-demo.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17133799581550274886,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494690485,308520857],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,110,105,99,107,101,108,45,100,101,109,111,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,100,101,109,111,45,50,51,55,98,53,57,53,102,48,102,97,49,50,50,49,99,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,100,101,109,111]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/dep-bin-nickel-demo b/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/dep-bin-nickel-demo deleted file mode 100644 index 2855b6f..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/nickel-demo-237b595f0fa1221c/dep-bin-nickel-demo and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus b/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus deleted file mode 100644 index 1dccbfc..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus b/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus deleted file mode 100644 index 4034476..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -217ca96f2013e965 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json b/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json deleted file mode 100644 index d194e57..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14782023287806247981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin b/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin deleted file mode 100644 index 0cb41ec..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin b/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin deleted file mode 100644 index 15042fa..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin +++ /dev/null @@ -1 +0,0 @@ -fe5452b4bfd6a452 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json b/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json deleted file mode 100644 index f48986f..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12568719763567827515,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.6"]},"features":"None","deps":[["typemap v0.3.3",1976382929852212923]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex deleted file mode 100644 index 0759ed3..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex deleted file mode 100644 index 9109b24..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex +++ /dev/null @@ -1 +0,0 @@ -e95423d3862aff19 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json deleted file mode 100644 index 108d9b4..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12670156471944522085,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.80"]},"features":"None","deps":[["aho-corasick v0.5.3",14256231624314091519],["memchr v0.1.11",14263844120805675548],["regex-syntax v0.3.9",2097099445182631133],["thread_local v0.2.7",2526850940345849094],["utf8-ranges v0.1.3",13231105802975277104]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax deleted file mode 100644 index dee7852..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax deleted file mode 100644 index 98b0bdf..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax +++ /dev/null @@ -1 +0,0 @@ -dd8cc7a0d5641a1d \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json b/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json deleted file mode 100644 index 1246c7a..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16088928192531196849,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.9"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize deleted file mode 100644 index 05fc32b..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize deleted file mode 100644 index ee09ec0..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize +++ /dev/null @@ -1 +0,0 @@ -dad29d83e1a304af \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json deleted file mode 100644 index aecb95d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6174518519135504061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.24"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version deleted file mode 100644 index 419486d..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version deleted file mode 100644 index 3366753..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version +++ /dev/null @@ -1 +0,0 @@ -d51c13e4b6e3705a \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json b/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json deleted file mode 100644 index bc529bd..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11775201468061381872,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.7"]},"features":"None","deps":[["semver v0.1.20",14856803705703146499]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver b/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver deleted file mode 100644 index 4727c54..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver b/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver deleted file mode 100644 index 1f64aa4..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver +++ /dev/null @@ -1 +0,0 @@ -03a4247041f82dce \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json b/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json deleted file mode 100644 index 80dc3e4..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15063406782213594189,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.20"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit b/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit deleted file mode 100644 index bad4e4f..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit b/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit deleted file mode 100644 index 2d7ee12..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit +++ /dev/null @@ -1 +0,0 @@ -27f8214cf839e6f5 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json b/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json deleted file mode 100644 index 69f187f..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14644760609178290408,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.4"]},"features":"None","deps":[["hpack v0.2.0",5410785256268673003],["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id b/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id deleted file mode 100644 index 8bdde89..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id b/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id deleted file mode 100644 index 052e169..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id +++ /dev/null @@ -1 +0,0 @@ -d76319d4a6e9df6a \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json b/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json deleted file mode 100644 index 9cfb3da..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12631885209046341097,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["2.0.0"]},"features":"None","deps":[["kernel32-sys v0.2.2",14973637682396376996],["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local b/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local deleted file mode 100644 index 4ad6756..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local b/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local deleted file mode 100644 index bcf2f53..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local +++ /dev/null @@ -1 +0,0 @@ -0615addb8a2d1123 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json b/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json deleted file mode 100644 index 2825f10..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12399525229491177571,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.7"]},"features":"None","deps":[["thread-id v2.0.0",7701130790559114199]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time b/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time deleted file mode 100644 index c6d9842..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time b/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time deleted file mode 100644 index d6c244e..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time +++ /dev/null @@ -1 +0,0 @@ -b505e27bdff64603 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json b/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json deleted file mode 100644 index 4b3cbdf..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13679010914831656735,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.37"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject deleted file mode 100644 index b1cbbb3..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject deleted file mode 100644 index b3f5f2f..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -8cadd4f61bbd3c2d \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json deleted file mode 100644 index c9b93d3..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2215649343267629176,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.0.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject deleted file mode 100644 index 7bfbef4..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject deleted file mode 100644 index 663679c..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -fabfa5c0a5a47bdf \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json b/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json deleted file mode 100644 index e556707..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":1404587104616339220,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable b/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable deleted file mode 100644 index 0fae60e..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable b/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable deleted file mode 100644 index 9b5d110..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable +++ /dev/null @@ -1 +0,0 @@ -b397d1b0c99cf1b3 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json b/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json deleted file mode 100644 index c8ff471..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13202766573542040543,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap b/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap deleted file mode 100644 index bdc40ff..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap b/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap deleted file mode 100644 index fb4199a..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap +++ /dev/null @@ -1 +0,0 @@ -bba6fca9cd856d1b \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json b/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json deleted file mode 100644 index 5333061..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11757239868683106182,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.3"]},"features":"None","deps":[["unsafe-any v0.4.1",3296955671196002993]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build deleted file mode 100644 index 7e31fd5..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build +++ /dev/null @@ -1 +0,0 @@ -2b5aa3e0785ef9fc \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build deleted file mode 100644 index 51e0a0f..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -a9fa850135674238 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json deleted file mode 100644 index fb84057..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["rustc_version v0.1.7",6516959035455118549]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json deleted file mode 100644 index fdaf932..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build deleted file mode 100644 index 5292dbd..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase deleted file mode 100644 index f2b25f1..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase deleted file mode 100644 index cbb6b4d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase +++ /dev/null @@ -1 +0,0 @@ -c42b754b3b498e25 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json deleted file mode 100644 index 60ee640..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14684722277282784625,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi deleted file mode 100644 index a2161d5..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi deleted file mode 100644 index c90bd4f..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi +++ /dev/null @@ -1 +0,0 @@ -9cc205b9b664365c \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json deleted file mode 100644 index 9c47f39..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10664899266290688281,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization deleted file mode 100644 index 59655df..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization deleted file mode 100644 index 0268800..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization +++ /dev/null @@ -1 +0,0 @@ -a5862017fb20fc9f \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json deleted file mode 100644 index eaaa5ad..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3481786930638344096,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any b/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any deleted file mode 100644 index 8af97ce..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any b/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any deleted file mode 100644 index 6ba7a5d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any +++ /dev/null @@ -1 +0,0 @@ -b1ead805b723c12d \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json b/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json deleted file mode 100644 index 7611f5d..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3115662218412856156,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.1"]},"features":"None","deps":[["traitobject v0.1.0",16103645924401987578]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url b/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url deleted file mode 100644 index 02216b0..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url b/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url deleted file mode 100644 index 27ec856..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url +++ /dev/null @@ -1 +0,0 @@ -23fd49bf27cd9e00 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json b/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json deleted file mode 100644 index cfdc518..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3797639690312906588,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["idna v0.1.1",17878798464614094747],["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges b/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges deleted file mode 100644 index 4539d26..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges b/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges deleted file mode 100644 index 3eaeb7e..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges +++ /dev/null @@ -1 +0,0 @@ -3070f35ba0549eb7 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json b/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json deleted file mode 100644 index 303d4dc..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17624444246549344061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.3"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi deleted file mode 100644 index 1513c68..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi deleted file mode 100644 index 54c3c64..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi +++ /dev/null @@ -1 +0,0 @@ -d4bfd02589333b71 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json deleted file mode 100644 index f4f22b1..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7062486825205066367,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.8"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build deleted file mode 100644 index c8bda55..0000000 Binary files a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build and /dev/null differ diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build deleted file mode 100644 index a8fbb6c..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build +++ /dev/null @@ -1 +0,0 @@ -43461a21489d8bf7 \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json b/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json deleted file mode 100644 index 64a13bc..0000000 --- a/Chapter09/nickel-demo/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3649318858816229980,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-demo/target/debug/nickel-demo b/Chapter09/nickel-demo/target/debug/nickel-demo deleted file mode 100644 index 7b88b8e..0000000 Binary files a/Chapter09/nickel-demo/target/debug/nickel-demo and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/Cargo.lock b/Chapter09/nickel-errorhandling/Cargo.lock deleted file mode 100644 index a8191a3..0000000 --- a/Chapter09/nickel-errorhandling/Cargo.lock +++ /dev/null @@ -1,367 +0,0 @@ -[root] -name = "nickel-errorhandling" -version = "0.1.0" -dependencies = [ - "nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mustache" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nickel" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "solicit" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unsafe-any" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fac05c29a9b1fe86c828ec974d6f027679576711a246711c476e548bf7d741" -"checksum nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14bdda46396b6447ae5f22b74296cb517d5c4659f31e3cfb5351bdd8e129791d" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Chapter09/nickel-errorhandling/Cargo.toml b/Chapter09/nickel-errorhandling/Cargo.toml deleted file mode 100644 index c6e47f0..0000000 --- a/Chapter09/nickel-errorhandling/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "nickel-errorhandling" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -nickel = "*" - diff --git a/Chapter09/nickel-errorhandling/_gitignore b/Chapter09/nickel-errorhandling/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter09/nickel-errorhandling/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter09/nickel-errorhandling/src/main.rs b/Chapter09/nickel-errorhandling/src/main.rs deleted file mode 100644 index a23c69d..0000000 --- a/Chapter09/nickel-errorhandling/src/main.rs +++ /dev/null @@ -1,35 +0,0 @@ -//-- ######################### -//-- Task: Custom error handling in nickel -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 20 April 17 -//-- ######################### - -#[macro_use] extern crate nickel; - -use std::io::Write; -use nickel::status::StatusCode::NotFound; -use nickel::{Nickel, NickelError, Action, Continue, Halt, Request}; - -fn main() { - let mut server = Nickel::new(); - - //this is how to overwrite the default error handler to handle 404 cases with a custom view - fn custom_404<'a>(err: &mut NickelError, _req: &mut Request) -> Action { - if let Some(ref mut res) = err.stream { - if res.status() == NotFound { - let _ = res.write_all(b"

Page Does not exist :(

"); - return Halt(()) - } - } - - Continue(()) - } - - let custom_handler: fn(&mut NickelError, &mut Request) -> Action = custom_404; - - server.handle_error(custom_handler); - - server.listen("127.0.0.1:6767"); - -} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick deleted file mode 100644 index e9f7eba..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick deleted file mode 100644 index 5aeb628..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick +++ /dev/null @@ -1 +0,0 @@ -ff77ee2a214fd8c5 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json deleted file mode 100644 index c298b69..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2822179955554191932,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.5.3"]},"features":"None","deps":[["memchr v0.1.11",14263844120805675548]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie deleted file mode 100644 index c2fa595..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie deleted file mode 100644 index 8455bba..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie +++ /dev/null @@ -1 +0,0 @@ -6fcbd3f38f83ce7a \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json deleted file mode 100644 index 5edbfe7..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10286856033600787685,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["time v0.1.37",236147470200079797],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable deleted file mode 100644 index 4eccc80..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable deleted file mode 100644 index 09b8c49..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable +++ /dev/null @@ -1 +0,0 @@ -a4d0cad3db7e1de5 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json deleted file mode 100644 index 8008d76..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17188910590859900981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack deleted file mode 100644 index 8485059..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack deleted file mode 100644 index b5c272a..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack +++ /dev/null @@ -1 +0,0 @@ -ebafd0e385f8164b \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json deleted file mode 100644 index 75dc73c..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":873799879772923555,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse deleted file mode 100644 index 5138915..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse deleted file mode 100644 index f08625c..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse +++ /dev/null @@ -1 +0,0 @@ -3c62c08e1fc6a0d3 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json deleted file mode 100644 index 63de418..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5063047255701104738,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.2.2"]},"features":"Some([\"default\", \"std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper deleted file mode 100644 index 3f84e25..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper deleted file mode 100644 index da41e9e..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper +++ /dev/null @@ -1 +0,0 @@ -31f83ac49baeb088 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json deleted file mode 100644 index 8cd46ca..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15235079123074667897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.18"]},"features":"None","deps":[["cookie v0.2.5",8849154972123908975],["httparse v1.2.2",15249406177117758012],["language-tags v0.2.2",10383946826862231348],["log v0.3.7",3152260632248025340],["mime v0.2.3",812930976970199887],["num_cpus v1.4.0",7343421697437563937],["rustc-serialize v0.3.24",12611385045515358938],["solicit v0.4.4",17718913522527762471],["time v0.1.37",236147470200079797],["traitobject v0.0.1",3259688158112296332],["typeable v0.1.2",12966317192245254067],["unicase v1.4.0",2706180945114115012],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna deleted file mode 100644 index 874f8a2..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna deleted file mode 100644 index 887f08b..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna +++ /dev/null @@ -1 +0,0 @@ -9b571f467a401ef8 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json deleted file mode 100644 index 0097822..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14198864472503947152,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929],["unicode-bidi v0.2.5",6644609036182733468],["unicode-normalization v0.1.4",11528125408958514853]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build deleted file mode 100644 index a7979d3..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build +++ /dev/null @@ -1 +0,0 @@ -d1a1cce467c66d55 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build deleted file mode 100644 index 83b5f95..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -1fafa3e3cb7e026f \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json deleted file mode 100644 index 785b445..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi-build v0.1.1",17837523682249557571]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json deleted file mode 100644 index 0bda9f1..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build deleted file mode 100644 index 2c283d8..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 deleted file mode 100644 index 577e999..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 deleted file mode 100644 index 5e88577..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 +++ /dev/null @@ -1 +0,0 @@ -a4afa36e230ccdcf \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json deleted file mode 100644 index 93041d8..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6026625737212813429,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi v0.2.8",8159171814049759188]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags deleted file mode 100644 index 79d6247..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags deleted file mode 100644 index dd3a9d5..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags +++ /dev/null @@ -1 +0,0 @@ -34ffaa5d9f301b90 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json deleted file mode 100644 index e3a75f1..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16334056662103425344,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static deleted file mode 100644 index 7459138..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static deleted file mode 100644 index 9e2e31a..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static +++ /dev/null @@ -1 +0,0 @@ -e6981f52e289ac1c \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json deleted file mode 100644 index ca22feb..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13219478138099434326,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.16"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc deleted file mode 100644 index 048d682..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc deleted file mode 100644 index 27a7c75..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc +++ /dev/null @@ -1 +0,0 @@ -41f8f628ade49c0e \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json deleted file mode 100644 index a9c8264..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17209458132245061813,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.22"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log deleted file mode 100644 index 3338aa1..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log deleted file mode 100644 index e9f3054..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log +++ /dev/null @@ -1 +0,0 @@ -fc8097f85714bf2b \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json deleted file mode 100644 index e7bcf33..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15770699670206912575,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.7"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches deleted file mode 100644 index c65343a..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches deleted file mode 100644 index a533c1d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches +++ /dev/null @@ -1 +0,0 @@ -c11ce1bafbf7cb92 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json deleted file mode 100644 index 0c43998..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15153744203340605494,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr deleted file mode 100644 index 061d105..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr deleted file mode 100644 index e9cc30d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr +++ /dev/null @@ -1 +0,0 @@ -1c922aa0a75af3c5 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json deleted file mode 100644 index bc199cf..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15077895593472080321,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.11"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime deleted file mode 100644 index 1ebff84..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime deleted file mode 100644 index dca25c1..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime +++ /dev/null @@ -1 +0,0 @@ -4f53389d6a1c480b \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json deleted file mode 100644 index cc43eaa..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":735843728989024041,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier deleted file mode 100644 index 254c4ae..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier deleted file mode 100644 index b04040a..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier +++ /dev/null @@ -1 +0,0 @@ -308e83cf450814c5 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json deleted file mode 100644 index 48afea1..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10119508123425398212,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache deleted file mode 100644 index 3220496..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache deleted file mode 100644 index dc45951..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache +++ /dev/null @@ -1 +0,0 @@ -d94dc9a0cd9e2df6 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json deleted file mode 100644 index b16f129..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14579009387232238119,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel deleted file mode 100644 index 668ed2a..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel deleted file mode 100644 index 0e8ee4b..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel +++ /dev/null @@ -1 +0,0 @@ -af9ae5bd1846886a \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json deleted file mode 100644 index 0df8034..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15913000049418327393,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.0"]},"features":"None","deps":[["groupable v0.2.0",16509491291626328228],["hyper v0.9.18",9849564369094637617],["lazy_static v0.1.16",2066177934189631718],["log v0.3.7",3152260632248025340],["modifier v0.1.0",14200984620933287472],["mustache v0.6.3",17739009113285283289],["plugin v0.2.6",5955120726143030526],["regex v0.1.80",1873262728565708009],["rustc-serialize v0.3.24",12611385045515358938],["time v0.1.37",236147470200079797],["typemap v0.3.3",1976382929852212923],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling deleted file mode 100644 index 605ab27..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling +++ /dev/null @@ -1 +0,0 @@ -c154e2c6c202d9ca \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling.json deleted file mode 100644 index c6abbdb..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/bin-nickel-errorhandling.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11513316380820461767,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494761594,378099172],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,99,111,100,101,47,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103,45,48,55,51,53,99,52,98,102,53,101,100,50,98,101,102,50,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/dep-bin-nickel-errorhandling b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/dep-bin-nickel-errorhandling deleted file mode 100644 index 6756feb..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-0735c4bf5ed2bef2/dep-bin-nickel-errorhandling and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling deleted file mode 100644 index 3a7c98f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling +++ /dev/null @@ -1 +0,0 @@ -aa8bf4944a549d29 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling.json deleted file mode 100644 index 59ab040..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/bin-nickel-errorhandling.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11634019728224132915,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494700507,328965528],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103,45,54,98,52,54,53,55,49,48,52,100,52,98,53,100,101,53,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,101,114,114,111,114,104,97,110,100,108,105,110,103]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/dep-bin-nickel-errorhandling b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/dep-bin-nickel-errorhandling deleted file mode 100644 index 1d55fb2..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/nickel-errorhandling-6b4657104d4b5de5/dep-bin-nickel-errorhandling and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus deleted file mode 100644 index e75ecb4..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus deleted file mode 100644 index 4034476..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -217ca96f2013e965 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json deleted file mode 100644 index d194e57..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14782023287806247981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin deleted file mode 100644 index 47072c0..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin deleted file mode 100644 index 15042fa..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin +++ /dev/null @@ -1 +0,0 @@ -fe5452b4bfd6a452 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json deleted file mode 100644 index f48986f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12568719763567827515,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.6"]},"features":"None","deps":[["typemap v0.3.3",1976382929852212923]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex deleted file mode 100644 index cd370b5..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex deleted file mode 100644 index 9109b24..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex +++ /dev/null @@ -1 +0,0 @@ -e95423d3862aff19 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json deleted file mode 100644 index 108d9b4..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12670156471944522085,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.80"]},"features":"None","deps":[["aho-corasick v0.5.3",14256231624314091519],["memchr v0.1.11",14263844120805675548],["regex-syntax v0.3.9",2097099445182631133],["thread_local v0.2.7",2526850940345849094],["utf8-ranges v0.1.3",13231105802975277104]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax deleted file mode 100644 index 61e76b3..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax deleted file mode 100644 index 98b0bdf..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax +++ /dev/null @@ -1 +0,0 @@ -dd8cc7a0d5641a1d \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json deleted file mode 100644 index 1246c7a..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16088928192531196849,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.9"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize deleted file mode 100644 index 655f0ca..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize deleted file mode 100644 index ee09ec0..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize +++ /dev/null @@ -1 +0,0 @@ -dad29d83e1a304af \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json deleted file mode 100644 index aecb95d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6174518519135504061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.24"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version deleted file mode 100644 index b83b6b3..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version deleted file mode 100644 index 3366753..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version +++ /dev/null @@ -1 +0,0 @@ -d51c13e4b6e3705a \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json deleted file mode 100644 index bc529bd..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11775201468061381872,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.7"]},"features":"None","deps":[["semver v0.1.20",14856803705703146499]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver deleted file mode 100644 index c906d29..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver deleted file mode 100644 index 1f64aa4..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver +++ /dev/null @@ -1 +0,0 @@ -03a4247041f82dce \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json deleted file mode 100644 index 80dc3e4..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15063406782213594189,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.20"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit deleted file mode 100644 index fc28b23..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit deleted file mode 100644 index 2d7ee12..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit +++ /dev/null @@ -1 +0,0 @@ -27f8214cf839e6f5 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json deleted file mode 100644 index 69f187f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14644760609178290408,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.4"]},"features":"None","deps":[["hpack v0.2.0",5410785256268673003],["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id deleted file mode 100644 index d8114d3..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id deleted file mode 100644 index 052e169..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id +++ /dev/null @@ -1 +0,0 @@ -d76319d4a6e9df6a \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json deleted file mode 100644 index 9cfb3da..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12631885209046341097,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["2.0.0"]},"features":"None","deps":[["kernel32-sys v0.2.2",14973637682396376996],["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local deleted file mode 100644 index f43366f..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local deleted file mode 100644 index bcf2f53..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local +++ /dev/null @@ -1 +0,0 @@ -0615addb8a2d1123 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json deleted file mode 100644 index 2825f10..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12399525229491177571,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.7"]},"features":"None","deps":[["thread-id v2.0.0",7701130790559114199]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time deleted file mode 100644 index c2c4b90..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time deleted file mode 100644 index d6c244e..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time +++ /dev/null @@ -1 +0,0 @@ -b505e27bdff64603 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json deleted file mode 100644 index 4b3cbdf..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13679010914831656735,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.37"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject deleted file mode 100644 index 16a7f22..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject deleted file mode 100644 index b3f5f2f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -8cadd4f61bbd3c2d \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json deleted file mode 100644 index c9b93d3..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2215649343267629176,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.0.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject deleted file mode 100644 index 973a1bb..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject deleted file mode 100644 index 663679c..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -fabfa5c0a5a47bdf \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json deleted file mode 100644 index e556707..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":1404587104616339220,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable deleted file mode 100644 index 728e9bd..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable deleted file mode 100644 index 9b5d110..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable +++ /dev/null @@ -1 +0,0 @@ -b397d1b0c99cf1b3 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json deleted file mode 100644 index c8ff471..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13202766573542040543,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap deleted file mode 100644 index 546ef03..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap deleted file mode 100644 index fb4199a..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap +++ /dev/null @@ -1 +0,0 @@ -bba6fca9cd856d1b \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json deleted file mode 100644 index 5333061..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11757239868683106182,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.3"]},"features":"None","deps":[["unsafe-any v0.4.1",3296955671196002993]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build deleted file mode 100644 index 7e31fd5..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build +++ /dev/null @@ -1 +0,0 @@ -2b5aa3e0785ef9fc \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build deleted file mode 100644 index 51e0a0f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -a9fa850135674238 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json deleted file mode 100644 index fb84057..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["rustc_version v0.1.7",6516959035455118549]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json deleted file mode 100644 index fdaf932..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build deleted file mode 100644 index f0facf9..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase deleted file mode 100644 index ac1a1d7..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase deleted file mode 100644 index cbb6b4d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase +++ /dev/null @@ -1 +0,0 @@ -c42b754b3b498e25 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json deleted file mode 100644 index 60ee640..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14684722277282784625,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi deleted file mode 100644 index 1829f23..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi deleted file mode 100644 index c90bd4f..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi +++ /dev/null @@ -1 +0,0 @@ -9cc205b9b664365c \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json deleted file mode 100644 index 9c47f39..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10664899266290688281,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization deleted file mode 100644 index 53ccda1..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization deleted file mode 100644 index 0268800..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization +++ /dev/null @@ -1 +0,0 @@ -a5862017fb20fc9f \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json deleted file mode 100644 index eaaa5ad..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3481786930638344096,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any deleted file mode 100644 index 7845bfb..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any deleted file mode 100644 index 6ba7a5d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any +++ /dev/null @@ -1 +0,0 @@ -b1ead805b723c12d \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json deleted file mode 100644 index 7611f5d..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3115662218412856156,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.1"]},"features":"None","deps":[["traitobject v0.1.0",16103645924401987578]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url deleted file mode 100644 index e2ff2c1..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url deleted file mode 100644 index 27ec856..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url +++ /dev/null @@ -1 +0,0 @@ -23fd49bf27cd9e00 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json deleted file mode 100644 index cfdc518..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3797639690312906588,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["idna v0.1.1",17878798464614094747],["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges deleted file mode 100644 index ae8888b..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges deleted file mode 100644 index 3eaeb7e..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges +++ /dev/null @@ -1 +0,0 @@ -3070f35ba0549eb7 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json deleted file mode 100644 index 303d4dc..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17624444246549344061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.3"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi deleted file mode 100644 index 2220e1c..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi deleted file mode 100644 index 54c3c64..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi +++ /dev/null @@ -1 +0,0 @@ -d4bfd02589333b71 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json deleted file mode 100644 index f4f22b1..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7062486825205066367,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.8"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build deleted file mode 100644 index 86cd1c1..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build and /dev/null differ diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build deleted file mode 100644 index a8fbb6c..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build +++ /dev/null @@ -1 +0,0 @@ -43461a21489d8bf7 \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json b/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json deleted file mode 100644 index 64a13bc..0000000 --- a/Chapter09/nickel-errorhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3649318858816229980,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-errorhandling/target/debug/_cargo-lock b/Chapter09/nickel-errorhandling/target/debug/_cargo-lock deleted file mode 100644 index e69de29..0000000 diff --git a/Chapter09/nickel-errorhandling/target/debug/nickel-errorhandling b/Chapter09/nickel-errorhandling/target/debug/nickel-errorhandling deleted file mode 100644 index 89ae6f8..0000000 Binary files a/Chapter09/nickel-errorhandling/target/debug/nickel-errorhandling and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/Cargo.lock b/Chapter09/nickel-jsonhandling/Cargo.lock deleted file mode 100644 index e98387b..0000000 --- a/Chapter09/nickel-jsonhandling/Cargo.lock +++ /dev/null @@ -1,368 +0,0 @@ -[root] -name = "nickel-jsonhandling" -version = "0.1.0" -dependencies = [ - "nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mustache" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nickel" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "solicit" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unsafe-any" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fac05c29a9b1fe86c828ec974d6f027679576711a246711c476e548bf7d741" -"checksum nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14bdda46396b6447ae5f22b74296cb517d5c4659f31e3cfb5351bdd8e129791d" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Chapter09/nickel-jsonhandling/Cargo.toml b/Chapter09/nickel-jsonhandling/Cargo.toml deleted file mode 100644 index a79cfde..0000000 --- a/Chapter09/nickel-jsonhandling/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "nickel-jsonhandling" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -nickel = "*" -rustc-serialize = "0.3.24" - diff --git a/Chapter09/nickel-jsonhandling/_gitignore b/Chapter09/nickel-jsonhandling/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter09/nickel-jsonhandling/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter09/nickel-jsonhandling/curl_request.txt b/Chapter09/nickel-jsonhandling/curl_request.txt deleted file mode 100644 index a226eb8..0000000 --- a/Chapter09/nickel-jsonhandling/curl_request.txt +++ /dev/null @@ -1 +0,0 @@ -curl -H "Content-Type: application/json" -X POST -d '{"firstname":"Vigneshwer","lastname":"Dhinakaran"}' http://127.0.0.1:6767/a/post/request \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/src/main.rs b/Chapter09/nickel-jsonhandling/src/main.rs deleted file mode 100644 index 8eb6d2e..0000000 --- a/Chapter09/nickel-jsonhandling/src/main.rs +++ /dev/null @@ -1,28 +0,0 @@ -//-- ######################### -//-- Task: Json handling in nickel -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 20 April 17 -//-- ######################### - -extern crate rustc_serialize; -#[macro_use] extern crate nickel; - -use nickel::{Nickel, HttpRouter, JsonBody}; - -#[derive(RustcDecodable, RustcEncodable)] -struct Person { - firstname: String, - lastname: String, -} - -fn main() { - let mut server = Nickel::new(); - - server.post("/a/post/request", middleware! { |request, response| - let person = request.json_as::().unwrap(); - format!("Hello {} {}", person.firstname, person.lastname) - }); - - server.listen("127.0.0.1:6767"); -} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick deleted file mode 100644 index 6f980eb..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick deleted file mode 100644 index 5aeb628..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick +++ /dev/null @@ -1 +0,0 @@ -ff77ee2a214fd8c5 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json deleted file mode 100644 index c298b69..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2822179955554191932,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.5.3"]},"features":"None","deps":[["memchr v0.1.11",14263844120805675548]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie deleted file mode 100644 index c6690fa..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie deleted file mode 100644 index 8455bba..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie +++ /dev/null @@ -1 +0,0 @@ -6fcbd3f38f83ce7a \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json deleted file mode 100644 index 5edbfe7..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10286856033600787685,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["time v0.1.37",236147470200079797],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable deleted file mode 100644 index f6196e8..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable deleted file mode 100644 index 09b8c49..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable +++ /dev/null @@ -1 +0,0 @@ -a4d0cad3db7e1de5 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json deleted file mode 100644 index 8008d76..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17188910590859900981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack deleted file mode 100644 index e82091e..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack deleted file mode 100644 index b5c272a..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack +++ /dev/null @@ -1 +0,0 @@ -ebafd0e385f8164b \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json deleted file mode 100644 index 75dc73c..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":873799879772923555,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse deleted file mode 100644 index 8ce77e6..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse deleted file mode 100644 index f08625c..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse +++ /dev/null @@ -1 +0,0 @@ -3c62c08e1fc6a0d3 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json deleted file mode 100644 index 63de418..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5063047255701104738,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.2.2"]},"features":"Some([\"default\", \"std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper deleted file mode 100644 index edb7388..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper deleted file mode 100644 index da41e9e..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper +++ /dev/null @@ -1 +0,0 @@ -31f83ac49baeb088 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json deleted file mode 100644 index 8cd46ca..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15235079123074667897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.18"]},"features":"None","deps":[["cookie v0.2.5",8849154972123908975],["httparse v1.2.2",15249406177117758012],["language-tags v0.2.2",10383946826862231348],["log v0.3.7",3152260632248025340],["mime v0.2.3",812930976970199887],["num_cpus v1.4.0",7343421697437563937],["rustc-serialize v0.3.24",12611385045515358938],["solicit v0.4.4",17718913522527762471],["time v0.1.37",236147470200079797],["traitobject v0.0.1",3259688158112296332],["typeable v0.1.2",12966317192245254067],["unicase v1.4.0",2706180945114115012],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna deleted file mode 100644 index 1ed03d2..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna deleted file mode 100644 index 887f08b..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna +++ /dev/null @@ -1 +0,0 @@ -9b571f467a401ef8 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json deleted file mode 100644 index 0097822..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14198864472503947152,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929],["unicode-bidi v0.2.5",6644609036182733468],["unicode-normalization v0.1.4",11528125408958514853]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build deleted file mode 100644 index a7979d3..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build +++ /dev/null @@ -1 +0,0 @@ -d1a1cce467c66d55 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build deleted file mode 100644 index 83b5f95..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -1fafa3e3cb7e026f \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json deleted file mode 100644 index 785b445..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi-build v0.1.1",17837523682249557571]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json deleted file mode 100644 index 0bda9f1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build deleted file mode 100644 index 2a04c7f..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 deleted file mode 100644 index 5025ba2..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 deleted file mode 100644 index 5e88577..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 +++ /dev/null @@ -1 +0,0 @@ -a4afa36e230ccdcf \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json deleted file mode 100644 index 93041d8..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6026625737212813429,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi v0.2.8",8159171814049759188]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags deleted file mode 100644 index fe64105..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags deleted file mode 100644 index dd3a9d5..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags +++ /dev/null @@ -1 +0,0 @@ -34ffaa5d9f301b90 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json deleted file mode 100644 index e3a75f1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16334056662103425344,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static deleted file mode 100644 index 1da13fd..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static deleted file mode 100644 index 9e2e31a..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static +++ /dev/null @@ -1 +0,0 @@ -e6981f52e289ac1c \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json deleted file mode 100644 index ca22feb..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13219478138099434326,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.16"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc deleted file mode 100644 index 2851a1b..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc deleted file mode 100644 index 27a7c75..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc +++ /dev/null @@ -1 +0,0 @@ -41f8f628ade49c0e \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json deleted file mode 100644 index a9c8264..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17209458132245061813,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.22"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log deleted file mode 100644 index 48f55c5..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log deleted file mode 100644 index e9f3054..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log +++ /dev/null @@ -1 +0,0 @@ -fc8097f85714bf2b \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json deleted file mode 100644 index e7bcf33..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15770699670206912575,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.7"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches deleted file mode 100644 index 08da730..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches deleted file mode 100644 index a533c1d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches +++ /dev/null @@ -1 +0,0 @@ -c11ce1bafbf7cb92 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json deleted file mode 100644 index 0c43998..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15153744203340605494,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr deleted file mode 100644 index c93e535..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr deleted file mode 100644 index e9cc30d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr +++ /dev/null @@ -1 +0,0 @@ -1c922aa0a75af3c5 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json deleted file mode 100644 index bc199cf..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15077895593472080321,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.11"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime deleted file mode 100644 index 33962eb..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime deleted file mode 100644 index dca25c1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime +++ /dev/null @@ -1 +0,0 @@ -4f53389d6a1c480b \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json deleted file mode 100644 index cc43eaa..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":735843728989024041,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier deleted file mode 100644 index e4e92d1..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier deleted file mode 100644 index b04040a..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier +++ /dev/null @@ -1 +0,0 @@ -308e83cf450814c5 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json deleted file mode 100644 index 48afea1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10119508123425398212,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache deleted file mode 100644 index 1cd15c4..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache deleted file mode 100644 index dc45951..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache +++ /dev/null @@ -1 +0,0 @@ -d94dc9a0cd9e2df6 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json deleted file mode 100644 index b16f129..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14579009387232238119,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel deleted file mode 100644 index d6a22e7..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel deleted file mode 100644 index 0e8ee4b..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel +++ /dev/null @@ -1 +0,0 @@ -af9ae5bd1846886a \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json deleted file mode 100644 index 0df8034..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15913000049418327393,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.0"]},"features":"None","deps":[["groupable v0.2.0",16509491291626328228],["hyper v0.9.18",9849564369094637617],["lazy_static v0.1.16",2066177934189631718],["log v0.3.7",3152260632248025340],["modifier v0.1.0",14200984620933287472],["mustache v0.6.3",17739009113285283289],["plugin v0.2.6",5955120726143030526],["regex v0.1.80",1873262728565708009],["rustc-serialize v0.3.24",12611385045515358938],["time v0.1.37",236147470200079797],["typemap v0.3.3",1976382929852212923],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling deleted file mode 100644 index 130ccf9..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling +++ /dev/null @@ -1 +0,0 @@ -c560a8ee61df9598 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling.json deleted file mode 100644 index 8954eaa..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/bin-nickel-jsonhandling.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15479398919831011737,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494693811,380668433],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103,45,56,102,53,99,50,50,102,99,53,49,49,102,102,55,55,100,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/dep-bin-nickel-jsonhandling b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/dep-bin-nickel-jsonhandling deleted file mode 100644 index 8a1e3ea..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-8f5c22fc511ff77d/dep-bin-nickel-jsonhandling and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling deleted file mode 100644 index 89e3ee7..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling +++ /dev/null @@ -1 +0,0 @@ -59d32c8064349e34 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling.json deleted file mode 100644 index b9aadd1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/bin-nickel-jsonhandling.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":8572238750257432284,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494760271,358040471],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,99,111,100,101,47,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103,45,97,54,51,49,55,51,102,52,51,102,102,54,99,98,52,100,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,106,115,111,110,104,97,110,100,108,105,110,103]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/dep-bin-nickel-jsonhandling b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/dep-bin-nickel-jsonhandling deleted file mode 100644 index 12952fd..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/nickel-jsonhandling-a63173f43ff6cb4d/dep-bin-nickel-jsonhandling and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus deleted file mode 100644 index 2f4247e..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus deleted file mode 100644 index 4034476..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -217ca96f2013e965 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json deleted file mode 100644 index d194e57..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14782023287806247981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin deleted file mode 100644 index 76b2323..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin deleted file mode 100644 index 15042fa..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin +++ /dev/null @@ -1 +0,0 @@ -fe5452b4bfd6a452 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json deleted file mode 100644 index f48986f..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12568719763567827515,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.6"]},"features":"None","deps":[["typemap v0.3.3",1976382929852212923]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex deleted file mode 100644 index 3f5a1a3..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex deleted file mode 100644 index 9109b24..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex +++ /dev/null @@ -1 +0,0 @@ -e95423d3862aff19 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json deleted file mode 100644 index 108d9b4..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12670156471944522085,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.80"]},"features":"None","deps":[["aho-corasick v0.5.3",14256231624314091519],["memchr v0.1.11",14263844120805675548],["regex-syntax v0.3.9",2097099445182631133],["thread_local v0.2.7",2526850940345849094],["utf8-ranges v0.1.3",13231105802975277104]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax deleted file mode 100644 index e8e239c..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax deleted file mode 100644 index 98b0bdf..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax +++ /dev/null @@ -1 +0,0 @@ -dd8cc7a0d5641a1d \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json deleted file mode 100644 index 1246c7a..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16088928192531196849,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.9"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize deleted file mode 100644 index 7b59f95..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize deleted file mode 100644 index ee09ec0..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize +++ /dev/null @@ -1 +0,0 @@ -dad29d83e1a304af \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json deleted file mode 100644 index aecb95d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6174518519135504061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.24"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version deleted file mode 100644 index e864bf3..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version deleted file mode 100644 index 3366753..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version +++ /dev/null @@ -1 +0,0 @@ -d51c13e4b6e3705a \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json deleted file mode 100644 index bc529bd..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11775201468061381872,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.7"]},"features":"None","deps":[["semver v0.1.20",14856803705703146499]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver deleted file mode 100644 index 9f53b69..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver deleted file mode 100644 index 1f64aa4..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver +++ /dev/null @@ -1 +0,0 @@ -03a4247041f82dce \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json deleted file mode 100644 index 80dc3e4..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15063406782213594189,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.20"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit deleted file mode 100644 index 5314c0a..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit deleted file mode 100644 index 2d7ee12..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit +++ /dev/null @@ -1 +0,0 @@ -27f8214cf839e6f5 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json deleted file mode 100644 index 69f187f..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14644760609178290408,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.4"]},"features":"None","deps":[["hpack v0.2.0",5410785256268673003],["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id deleted file mode 100644 index e26551d..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id deleted file mode 100644 index 052e169..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id +++ /dev/null @@ -1 +0,0 @@ -d76319d4a6e9df6a \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json deleted file mode 100644 index 9cfb3da..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12631885209046341097,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["2.0.0"]},"features":"None","deps":[["kernel32-sys v0.2.2",14973637682396376996],["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local deleted file mode 100644 index ff5ac7d..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local deleted file mode 100644 index bcf2f53..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local +++ /dev/null @@ -1 +0,0 @@ -0615addb8a2d1123 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json deleted file mode 100644 index 2825f10..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12399525229491177571,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.7"]},"features":"None","deps":[["thread-id v2.0.0",7701130790559114199]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time deleted file mode 100644 index 81f8bdc..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time deleted file mode 100644 index d6c244e..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time +++ /dev/null @@ -1 +0,0 @@ -b505e27bdff64603 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json deleted file mode 100644 index 4b3cbdf..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13679010914831656735,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.37"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject deleted file mode 100644 index 7f5aaa9..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject deleted file mode 100644 index b3f5f2f..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -8cadd4f61bbd3c2d \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json deleted file mode 100644 index c9b93d3..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2215649343267629176,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.0.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject deleted file mode 100644 index 8c9aad4..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject deleted file mode 100644 index 663679c..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -fabfa5c0a5a47bdf \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json deleted file mode 100644 index e556707..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":1404587104616339220,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable deleted file mode 100644 index b00966a..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable deleted file mode 100644 index 9b5d110..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable +++ /dev/null @@ -1 +0,0 @@ -b397d1b0c99cf1b3 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json deleted file mode 100644 index c8ff471..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13202766573542040543,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap deleted file mode 100644 index 57e9f41..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap deleted file mode 100644 index fb4199a..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap +++ /dev/null @@ -1 +0,0 @@ -bba6fca9cd856d1b \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json deleted file mode 100644 index 5333061..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11757239868683106182,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.3"]},"features":"None","deps":[["unsafe-any v0.4.1",3296955671196002993]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build deleted file mode 100644 index 7e31fd5..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build +++ /dev/null @@ -1 +0,0 @@ -2b5aa3e0785ef9fc \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build deleted file mode 100644 index 51e0a0f..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -a9fa850135674238 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json deleted file mode 100644 index fb84057..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["rustc_version v0.1.7",6516959035455118549]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json deleted file mode 100644 index fdaf932..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build deleted file mode 100644 index e5ef37c..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase deleted file mode 100644 index dec60d8..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase deleted file mode 100644 index cbb6b4d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase +++ /dev/null @@ -1 +0,0 @@ -c42b754b3b498e25 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json deleted file mode 100644 index 60ee640..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14684722277282784625,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi deleted file mode 100644 index c55dcd8..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi deleted file mode 100644 index c90bd4f..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi +++ /dev/null @@ -1 +0,0 @@ -9cc205b9b664365c \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json deleted file mode 100644 index 9c47f39..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10664899266290688281,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization deleted file mode 100644 index 9cd05ec..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization deleted file mode 100644 index 0268800..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization +++ /dev/null @@ -1 +0,0 @@ -a5862017fb20fc9f \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json deleted file mode 100644 index eaaa5ad..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3481786930638344096,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any deleted file mode 100644 index e710839..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any deleted file mode 100644 index 6ba7a5d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any +++ /dev/null @@ -1 +0,0 @@ -b1ead805b723c12d \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json deleted file mode 100644 index 7611f5d..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3115662218412856156,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.1"]},"features":"None","deps":[["traitobject v0.1.0",16103645924401987578]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url deleted file mode 100644 index 5062eb3..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url deleted file mode 100644 index 27ec856..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url +++ /dev/null @@ -1 +0,0 @@ -23fd49bf27cd9e00 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json deleted file mode 100644 index cfdc518..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3797639690312906588,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["idna v0.1.1",17878798464614094747],["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges deleted file mode 100644 index 7b04f44..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges deleted file mode 100644 index 3eaeb7e..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges +++ /dev/null @@ -1 +0,0 @@ -3070f35ba0549eb7 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json deleted file mode 100644 index 303d4dc..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17624444246549344061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.3"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi deleted file mode 100644 index 834ebea..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi deleted file mode 100644 index 54c3c64..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi +++ /dev/null @@ -1 +0,0 @@ -d4bfd02589333b71 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json deleted file mode 100644 index f4f22b1..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7062486825205066367,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.8"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build deleted file mode 100644 index 0e61a7e..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build and /dev/null differ diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build deleted file mode 100644 index a8fbb6c..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build +++ /dev/null @@ -1 +0,0 @@ -43461a21489d8bf7 \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json b/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json deleted file mode 100644 index 64a13bc..0000000 --- a/Chapter09/nickel-jsonhandling/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3649318858816229980,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-jsonhandling/target/debug/_cargo-lock b/Chapter09/nickel-jsonhandling/target/debug/_cargo-lock deleted file mode 100644 index e69de29..0000000 diff --git a/Chapter09/nickel-jsonhandling/target/debug/nickel-jsonhandling b/Chapter09/nickel-jsonhandling/target/debug/nickel-jsonhandling deleted file mode 100644 index 69e87c8..0000000 Binary files a/Chapter09/nickel-jsonhandling/target/debug/nickel-jsonhandling and /dev/null differ diff --git a/Chapter09/nickel-routing/Cargo.lock b/Chapter09/nickel-routing/Cargo.lock deleted file mode 100644 index d92ea7e..0000000 --- a/Chapter09/nickel-routing/Cargo.lock +++ /dev/null @@ -1,367 +0,0 @@ -[root] -name = "nickel-routing" -version = "0.1.0" -dependencies = [ - "nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mustache" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nickel" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "solicit" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unsafe-any" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fac05c29a9b1fe86c828ec974d6f027679576711a246711c476e548bf7d741" -"checksum nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14bdda46396b6447ae5f22b74296cb517d5c4659f31e3cfb5351bdd8e129791d" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Chapter09/nickel-routing/Cargo.toml b/Chapter09/nickel-routing/Cargo.toml deleted file mode 100644 index d9d88d1..0000000 --- a/Chapter09/nickel-routing/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "nickel-routing" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -nickel = "*" diff --git a/Chapter09/nickel-routing/_gitignore b/Chapter09/nickel-routing/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter09/nickel-routing/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter09/nickel-routing/src/main.rs b/Chapter09/nickel-routing/src/main.rs deleted file mode 100644 index 97f1441..0000000 --- a/Chapter09/nickel-routing/src/main.rs +++ /dev/null @@ -1,23 +0,0 @@ -//-- ######################### -//-- Task: Routing using nickel -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 20 April 17 -//-- ######################### - -#[macro_use] extern crate nickel; - -use nickel::{Nickel, HttpRouter}; - -fn main() { - let mut server = Nickel::new(); - - server.get("/bar", middleware!("This is the /bar handler")); - server.get("/user/:userid", middleware! { |request| - format!("This is user: {:?}", request.param("userid")) - }); - server.get("/a/*/d", middleware!("matches /a/b/d but not /a/b/c/d")); - server.get("/a/**/d", middleware!("This matches /a/b/d and also /a/b/c/d")); - - server.listen("127.0.0.1:6767"); -} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick b/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick deleted file mode 100644 index c1967f9..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick b/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick deleted file mode 100644 index 5aeb628..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick +++ /dev/null @@ -1 +0,0 @@ -ff77ee2a214fd8c5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json b/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json deleted file mode 100644 index c298b69..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2822179955554191932,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.5.3"]},"features":"None","deps":[["memchr v0.1.11",14263844120805675548]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie b/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie deleted file mode 100644 index 72ff195..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie b/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie deleted file mode 100644 index 8455bba..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie +++ /dev/null @@ -1 +0,0 @@ -6fcbd3f38f83ce7a \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json b/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json deleted file mode 100644 index 5edbfe7..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10286856033600787685,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["time v0.1.37",236147470200079797],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable b/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable deleted file mode 100644 index db14c1d..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable b/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable deleted file mode 100644 index 09b8c49..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable +++ /dev/null @@ -1 +0,0 @@ -a4d0cad3db7e1de5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json b/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json deleted file mode 100644 index 8008d76..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17188910590859900981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack b/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack deleted file mode 100644 index bab4eba..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack b/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack deleted file mode 100644 index b5c272a..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack +++ /dev/null @@ -1 +0,0 @@ -ebafd0e385f8164b \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json b/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json deleted file mode 100644 index 75dc73c..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":873799879772923555,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse b/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse deleted file mode 100644 index 03300b7..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse b/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse deleted file mode 100644 index f08625c..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse +++ /dev/null @@ -1 +0,0 @@ -3c62c08e1fc6a0d3 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json b/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json deleted file mode 100644 index 63de418..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5063047255701104738,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.2.2"]},"features":"Some([\"default\", \"std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper b/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper deleted file mode 100644 index 086db5b..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper b/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper deleted file mode 100644 index da41e9e..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper +++ /dev/null @@ -1 +0,0 @@ -31f83ac49baeb088 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json b/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json deleted file mode 100644 index 8cd46ca..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15235079123074667897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.18"]},"features":"None","deps":[["cookie v0.2.5",8849154972123908975],["httparse v1.2.2",15249406177117758012],["language-tags v0.2.2",10383946826862231348],["log v0.3.7",3152260632248025340],["mime v0.2.3",812930976970199887],["num_cpus v1.4.0",7343421697437563937],["rustc-serialize v0.3.24",12611385045515358938],["solicit v0.4.4",17718913522527762471],["time v0.1.37",236147470200079797],["traitobject v0.0.1",3259688158112296332],["typeable v0.1.2",12966317192245254067],["unicase v1.4.0",2706180945114115012],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna b/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna deleted file mode 100644 index 6bb1010..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna b/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna deleted file mode 100644 index 887f08b..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna +++ /dev/null @@ -1 +0,0 @@ -9b571f467a401ef8 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json b/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json deleted file mode 100644 index 0097822..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14198864472503947152,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929],["unicode-bidi v0.2.5",6644609036182733468],["unicode-normalization v0.1.4",11528125408958514853]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build deleted file mode 100644 index a7979d3..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build +++ /dev/null @@ -1 +0,0 @@ -d1a1cce467c66d55 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build deleted file mode 100644 index 83b5f95..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -1fafa3e3cb7e026f \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json deleted file mode 100644 index 785b445..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi-build v0.1.1",17837523682249557571]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json deleted file mode 100644 index 0bda9f1..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build deleted file mode 100644 index 7dc25c3..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 deleted file mode 100644 index 6562d36..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 deleted file mode 100644 index 5e88577..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 +++ /dev/null @@ -1 +0,0 @@ -a4afa36e230ccdcf \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json b/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json deleted file mode 100644 index 93041d8..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6026625737212813429,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi v0.2.8",8159171814049759188]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags b/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags deleted file mode 100644 index 5320f41..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags b/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags deleted file mode 100644 index dd3a9d5..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags +++ /dev/null @@ -1 +0,0 @@ -34ffaa5d9f301b90 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json b/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json deleted file mode 100644 index e3a75f1..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16334056662103425344,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static b/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static deleted file mode 100644 index 938a591..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static b/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static deleted file mode 100644 index 9e2e31a..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static +++ /dev/null @@ -1 +0,0 @@ -e6981f52e289ac1c \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json b/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json deleted file mode 100644 index ca22feb..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13219478138099434326,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.16"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc b/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc deleted file mode 100644 index b4bb471..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc b/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc deleted file mode 100644 index 27a7c75..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc +++ /dev/null @@ -1 +0,0 @@ -41f8f628ade49c0e \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json b/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json deleted file mode 100644 index a9c8264..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17209458132245061813,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.22"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log b/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log deleted file mode 100644 index 0479ec5..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log b/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log deleted file mode 100644 index e9f3054..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log +++ /dev/null @@ -1 +0,0 @@ -fc8097f85714bf2b \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json b/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json deleted file mode 100644 index e7bcf33..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15770699670206912575,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.7"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches b/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches deleted file mode 100644 index 304539f..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches b/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches deleted file mode 100644 index a533c1d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches +++ /dev/null @@ -1 +0,0 @@ -c11ce1bafbf7cb92 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json b/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json deleted file mode 100644 index 0c43998..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15153744203340605494,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr b/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr deleted file mode 100644 index d944017..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr b/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr deleted file mode 100644 index e9cc30d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr +++ /dev/null @@ -1 +0,0 @@ -1c922aa0a75af3c5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json b/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json deleted file mode 100644 index bc199cf..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15077895593472080321,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.11"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime b/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime deleted file mode 100644 index 1d7865d..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime b/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime deleted file mode 100644 index dca25c1..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime +++ /dev/null @@ -1 +0,0 @@ -4f53389d6a1c480b \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json b/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json deleted file mode 100644 index cc43eaa..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":735843728989024041,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier b/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier deleted file mode 100644 index f936a48..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier b/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier deleted file mode 100644 index b04040a..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier +++ /dev/null @@ -1 +0,0 @@ -308e83cf450814c5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json b/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json deleted file mode 100644 index 48afea1..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10119508123425398212,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache b/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache deleted file mode 100644 index 9eb36cd..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache b/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache deleted file mode 100644 index dc45951..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache +++ /dev/null @@ -1 +0,0 @@ -d94dc9a0cd9e2df6 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json b/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json deleted file mode 100644 index b16f129..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14579009387232238119,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel deleted file mode 100644 index 0bfc093..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel deleted file mode 100644 index 0e8ee4b..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel +++ /dev/null @@ -1 +0,0 @@ -af9ae5bd1846886a \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json deleted file mode 100644 index 0df8034..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15913000049418327393,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.0"]},"features":"None","deps":[["groupable v0.2.0",16509491291626328228],["hyper v0.9.18",9849564369094637617],["lazy_static v0.1.16",2066177934189631718],["log v0.3.7",3152260632248025340],["modifier v0.1.0",14200984620933287472],["mustache v0.6.3",17739009113285283289],["plugin v0.2.6",5955120726143030526],["regex v0.1.80",1873262728565708009],["rustc-serialize v0.3.24",12611385045515358938],["time v0.1.37",236147470200079797],["typemap v0.3.3",1976382929852212923],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing deleted file mode 100644 index 1d25b0f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing +++ /dev/null @@ -1 +0,0 @@ -a579db674dad10a5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing.json b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing.json deleted file mode 100644 index 6b0d4ee..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/bin-nickel-routing.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":9115148535863625720,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494691276,284555953],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,110,105,99,107,101,108,45,114,111,117,116,105,110,103,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,114,111,117,116,105,110,103,45,52,101,97,54,97,97,57,98,53,53,56,49,101,50,56,97,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,114,111,117,116,105,110,103]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/dep-bin-nickel-routing b/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/dep-bin-nickel-routing deleted file mode 100644 index ab6ec35..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/nickel-routing-4ea6aa9b5581e28a/dep-bin-nickel-routing and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus b/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus deleted file mode 100644 index cb5fa91..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus b/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus deleted file mode 100644 index 4034476..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -217ca96f2013e965 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json b/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json deleted file mode 100644 index d194e57..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14782023287806247981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin b/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin deleted file mode 100644 index 5435c9f..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin b/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin deleted file mode 100644 index 15042fa..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin +++ /dev/null @@ -1 +0,0 @@ -fe5452b4bfd6a452 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json b/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json deleted file mode 100644 index f48986f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12568719763567827515,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.6"]},"features":"None","deps":[["typemap v0.3.3",1976382929852212923]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex deleted file mode 100644 index 3cf291b..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex deleted file mode 100644 index 9109b24..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex +++ /dev/null @@ -1 +0,0 @@ -e95423d3862aff19 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json deleted file mode 100644 index 108d9b4..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12670156471944522085,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.80"]},"features":"None","deps":[["aho-corasick v0.5.3",14256231624314091519],["memchr v0.1.11",14263844120805675548],["regex-syntax v0.3.9",2097099445182631133],["thread_local v0.2.7",2526850940345849094],["utf8-ranges v0.1.3",13231105802975277104]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax deleted file mode 100644 index 6f6e1e5..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax deleted file mode 100644 index 98b0bdf..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax +++ /dev/null @@ -1 +0,0 @@ -dd8cc7a0d5641a1d \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json b/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json deleted file mode 100644 index 1246c7a..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16088928192531196849,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.9"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize deleted file mode 100644 index e40f51b..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize deleted file mode 100644 index ee09ec0..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize +++ /dev/null @@ -1 +0,0 @@ -dad29d83e1a304af \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json deleted file mode 100644 index aecb95d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6174518519135504061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.24"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version deleted file mode 100644 index 78021d2..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version deleted file mode 100644 index 3366753..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version +++ /dev/null @@ -1 +0,0 @@ -d51c13e4b6e3705a \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json b/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json deleted file mode 100644 index bc529bd..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11775201468061381872,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.7"]},"features":"None","deps":[["semver v0.1.20",14856803705703146499]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver b/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver deleted file mode 100644 index b09943a..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver b/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver deleted file mode 100644 index 1f64aa4..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver +++ /dev/null @@ -1 +0,0 @@ -03a4247041f82dce \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json b/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json deleted file mode 100644 index 80dc3e4..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15063406782213594189,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.20"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit b/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit deleted file mode 100644 index 3fa13d0..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit b/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit deleted file mode 100644 index 2d7ee12..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit +++ /dev/null @@ -1 +0,0 @@ -27f8214cf839e6f5 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json b/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json deleted file mode 100644 index 69f187f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14644760609178290408,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.4"]},"features":"None","deps":[["hpack v0.2.0",5410785256268673003],["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id b/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id deleted file mode 100644 index 381140f..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id b/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id deleted file mode 100644 index 052e169..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id +++ /dev/null @@ -1 +0,0 @@ -d76319d4a6e9df6a \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json b/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json deleted file mode 100644 index 9cfb3da..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12631885209046341097,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["2.0.0"]},"features":"None","deps":[["kernel32-sys v0.2.2",14973637682396376996],["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local b/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local deleted file mode 100644 index 23a5947..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local b/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local deleted file mode 100644 index bcf2f53..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local +++ /dev/null @@ -1 +0,0 @@ -0615addb8a2d1123 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json b/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json deleted file mode 100644 index 2825f10..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12399525229491177571,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.7"]},"features":"None","deps":[["thread-id v2.0.0",7701130790559114199]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time b/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time deleted file mode 100644 index 8e508d8..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time b/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time deleted file mode 100644 index d6c244e..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time +++ /dev/null @@ -1 +0,0 @@ -b505e27bdff64603 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json b/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json deleted file mode 100644 index 4b3cbdf..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13679010914831656735,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.37"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject deleted file mode 100644 index 333c5fc..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject deleted file mode 100644 index b3f5f2f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -8cadd4f61bbd3c2d \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json deleted file mode 100644 index c9b93d3..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2215649343267629176,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.0.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject deleted file mode 100644 index 7b2d784..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject deleted file mode 100644 index 663679c..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -fabfa5c0a5a47bdf \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json b/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json deleted file mode 100644 index e556707..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":1404587104616339220,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable b/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable deleted file mode 100644 index 1e3e895..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable b/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable deleted file mode 100644 index 9b5d110..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable +++ /dev/null @@ -1 +0,0 @@ -b397d1b0c99cf1b3 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json b/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json deleted file mode 100644 index c8ff471..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13202766573542040543,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap b/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap deleted file mode 100644 index 38a9826..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap b/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap deleted file mode 100644 index fb4199a..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap +++ /dev/null @@ -1 +0,0 @@ -bba6fca9cd856d1b \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json b/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json deleted file mode 100644 index 5333061..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11757239868683106182,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.3"]},"features":"None","deps":[["unsafe-any v0.4.1",3296955671196002993]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build deleted file mode 100644 index 7e31fd5..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build +++ /dev/null @@ -1 +0,0 @@ -2b5aa3e0785ef9fc \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build deleted file mode 100644 index 51e0a0f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -a9fa850135674238 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json deleted file mode 100644 index fb84057..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["rustc_version v0.1.7",6516959035455118549]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json deleted file mode 100644 index fdaf932..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build deleted file mode 100644 index 31b4216..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase deleted file mode 100644 index 18f0e90..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase deleted file mode 100644 index cbb6b4d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase +++ /dev/null @@ -1 +0,0 @@ -c42b754b3b498e25 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json deleted file mode 100644 index 60ee640..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14684722277282784625,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi deleted file mode 100644 index 92a3569..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi deleted file mode 100644 index c90bd4f..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi +++ /dev/null @@ -1 +0,0 @@ -9cc205b9b664365c \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json deleted file mode 100644 index 9c47f39..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10664899266290688281,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization deleted file mode 100644 index db156d0..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization deleted file mode 100644 index 0268800..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization +++ /dev/null @@ -1 +0,0 @@ -a5862017fb20fc9f \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json deleted file mode 100644 index eaaa5ad..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3481786930638344096,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any b/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any deleted file mode 100644 index fc499ba..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any b/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any deleted file mode 100644 index 6ba7a5d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any +++ /dev/null @@ -1 +0,0 @@ -b1ead805b723c12d \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json b/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json deleted file mode 100644 index 7611f5d..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3115662218412856156,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.1"]},"features":"None","deps":[["traitobject v0.1.0",16103645924401987578]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url b/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url deleted file mode 100644 index 475e89e..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url b/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url deleted file mode 100644 index 27ec856..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url +++ /dev/null @@ -1 +0,0 @@ -23fd49bf27cd9e00 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json b/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json deleted file mode 100644 index cfdc518..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3797639690312906588,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["idna v0.1.1",17878798464614094747],["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges b/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges deleted file mode 100644 index 789637b..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges b/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges deleted file mode 100644 index 3eaeb7e..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges +++ /dev/null @@ -1 +0,0 @@ -3070f35ba0549eb7 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json b/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json deleted file mode 100644 index 303d4dc..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17624444246549344061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.3"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi deleted file mode 100644 index b1e0784..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi deleted file mode 100644 index 54c3c64..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi +++ /dev/null @@ -1 +0,0 @@ -d4bfd02589333b71 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json deleted file mode 100644 index f4f22b1..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7062486825205066367,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.8"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build deleted file mode 100644 index fe0afa5..0000000 Binary files a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build and /dev/null differ diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build deleted file mode 100644 index a8fbb6c..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build +++ /dev/null @@ -1 +0,0 @@ -43461a21489d8bf7 \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json b/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json deleted file mode 100644 index 64a13bc..0000000 --- a/Chapter09/nickel-routing/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3649318858816229980,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-routing/target/debug/_cargo-lock b/Chapter09/nickel-routing/target/debug/_cargo-lock deleted file mode 100644 index e69de29..0000000 diff --git a/Chapter09/nickel-routing/target/debug/nickel-routing b/Chapter09/nickel-routing/target/debug/nickel-routing deleted file mode 100644 index 16649af..0000000 Binary files a/Chapter09/nickel-routing/target/debug/nickel-routing and /dev/null differ diff --git a/Chapter09/nickel-template/Cargo.lock b/Chapter09/nickel-template/Cargo.lock deleted file mode 100644 index 96443d9..0000000 --- a/Chapter09/nickel-template/Cargo.lock +++ /dev/null @@ -1,367 +0,0 @@ -[root] -name = "nickel-template" -version = "0.1.0" -dependencies = [ - "nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mustache" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nickel" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "solicit" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unsafe-any" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mustache 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fac05c29a9b1fe86c828ec974d6f027679576711a246711c476e548bf7d741" -"checksum nickel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14bdda46396b6447ae5f22b74296cb517d5c4659f31e3cfb5351bdd8e129791d" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Chapter09/nickel-template/Cargo.toml b/Chapter09/nickel-template/Cargo.toml deleted file mode 100644 index 18da1db..0000000 --- a/Chapter09/nickel-template/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "nickel-template" -version = "0.1.0" -authors = ["Vigneshwer.D "] - -[dependencies] -nickel = "*" - diff --git a/Chapter09/nickel-template/_gitignore b/Chapter09/nickel-template/_gitignore deleted file mode 100644 index eb5a316..0000000 --- a/Chapter09/nickel-template/_gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/Chapter09/nickel-template/examples/assets/template.tpl b/Chapter09/nickel-template/examples/assets/template.tpl deleted file mode 100644 index e90e60c..0000000 --- a/Chapter09/nickel-template/examples/assets/template.tpl +++ /dev/null @@ -1,7 +0,0 @@ - - -

- Hello {{ name }}! -

- - \ No newline at end of file diff --git a/Chapter09/nickel-template/src/main.rs b/Chapter09/nickel-template/src/main.rs deleted file mode 100644 index 1f51253..0000000 --- a/Chapter09/nickel-template/src/main.rs +++ /dev/null @@ -1,23 +0,0 @@ -//-- ######################### -//-- Task: Templating in nickel -//-- Author: Vigneshwer.D -//-- Version: 1.0.0 -//-- Date: 20 April 17 -//-- ######################### - -#[macro_use] extern crate nickel; - -use std::collections::HashMap; -use nickel::{Nickel, HttpRouter}; - -fn main() { - let mut server = Nickel::new(); - - server.get("/", middleware! { |_, response| - let mut data = HashMap::new(); - data.insert("name", "viki"); - return response.render("examples/assets/template.tpl", &data); - }); - - server.listen("127.0.0.1:6767"); -} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick b/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick deleted file mode 100644 index 73d25ca..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/dep-lib-aho_corasick and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick b/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick deleted file mode 100644 index 5aeb628..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick +++ /dev/null @@ -1 +0,0 @@ -ff77ee2a214fd8c5 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json b/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json deleted file mode 100644 index c298b69..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/aho-corasick-1acf556bb0118ec7/lib-aho_corasick.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2822179955554191932,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.5.3"]},"features":"None","deps":[["memchr v0.1.11",14263844120805675548]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie b/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie deleted file mode 100644 index 41937e7..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/dep-lib-cookie and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie b/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie deleted file mode 100644 index 8455bba..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie +++ /dev/null @@ -1 +0,0 @@ -6fcbd3f38f83ce7a \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json b/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json deleted file mode 100644 index 5edbfe7..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/cookie-7a35d0499a3d6591/lib-cookie.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10286856033600787685,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["time v0.1.37",236147470200079797],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable b/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable deleted file mode 100644 index 05d666b..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/dep-lib-groupable and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable b/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable deleted file mode 100644 index 09b8c49..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable +++ /dev/null @@ -1 +0,0 @@ -a4d0cad3db7e1de5 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json b/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json deleted file mode 100644 index 8008d76..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/groupable-27ce56ef3c3a3a69/lib-groupable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17188910590859900981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack b/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack deleted file mode 100644 index 7dc0e61..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/dep-lib-hpack and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack b/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack deleted file mode 100644 index b5c272a..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack +++ /dev/null @@ -1 +0,0 @@ -ebafd0e385f8164b \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json b/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json deleted file mode 100644 index 75dc73c..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/hpack-e3cbfd1f9c5df7e1/lib-hpack.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":873799879772923555,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.0"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse b/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse deleted file mode 100644 index 6cf1a8e..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/dep-lib-httparse and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse b/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse deleted file mode 100644 index f08625c..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse +++ /dev/null @@ -1 +0,0 @@ -3c62c08e1fc6a0d3 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json b/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json deleted file mode 100644 index 63de418..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/httparse-a3e47f33b4499d34/lib-httparse.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":5063047255701104738,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.2.2"]},"features":"Some([\"default\", \"std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper b/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper deleted file mode 100644 index 61ac3a2..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/dep-lib-hyper and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper b/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper deleted file mode 100644 index da41e9e..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper +++ /dev/null @@ -1 +0,0 @@ -31f83ac49baeb088 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json b/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json deleted file mode 100644 index 8cd46ca..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/hyper-5d54c6aedc143c16/lib-hyper.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15235079123074667897,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.18"]},"features":"None","deps":[["cookie v0.2.5",8849154972123908975],["httparse v1.2.2",15249406177117758012],["language-tags v0.2.2",10383946826862231348],["log v0.3.7",3152260632248025340],["mime v0.2.3",812930976970199887],["num_cpus v1.4.0",7343421697437563937],["rustc-serialize v0.3.24",12611385045515358938],["solicit v0.4.4",17718913522527762471],["time v0.1.37",236147470200079797],["traitobject v0.0.1",3259688158112296332],["typeable v0.1.2",12966317192245254067],["unicase v1.4.0",2706180945114115012],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna b/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna deleted file mode 100644 index 76b1569..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/dep-lib-idna and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna b/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna deleted file mode 100644 index 887f08b..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna +++ /dev/null @@ -1 +0,0 @@ -9b571f467a401ef8 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json b/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json deleted file mode 100644 index 0097822..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/idna-ae4d6b212818895f/lib-idna.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14198864472503947152,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929],["unicode-bidi v0.2.5",6644609036182733468],["unicode-normalization v0.1.4",11528125408958514853]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build deleted file mode 100644 index a7979d3..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build +++ /dev/null @@ -1 +0,0 @@ -d1a1cce467c66d55 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build deleted file mode 100644 index 83b5f95..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -1fafa3e3cb7e026f \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json deleted file mode 100644 index 785b445..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi-build v0.1.1",17837523682249557571]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json deleted file mode 100644 index 0bda9f1..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build deleted file mode 100644 index 4fe5bd7..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 deleted file mode 100644 index 8745998..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/dep-lib-kernel32 and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 deleted file mode 100644 index 5e88577..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32 +++ /dev/null @@ -1 +0,0 @@ -a4afa36e230ccdcf \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json b/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json deleted file mode 100644 index 93041d8..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/kernel32-sys-d6afa5bd3d7cfaef/lib-kernel32.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6026625737212813429,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[["winapi v0.2.8",8159171814049759188]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags b/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags deleted file mode 100644 index 1e15f76..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/dep-lib-language-tags and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags b/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags deleted file mode 100644 index dd3a9d5..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags +++ /dev/null @@ -1 +0,0 @@ -34ffaa5d9f301b90 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json b/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json deleted file mode 100644 index e3a75f1..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/language-tags-f0b8299e7a55e655/lib-language-tags.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16334056662103425344,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static b/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static deleted file mode 100644 index 6bd03e7..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/dep-lib-lazy_static and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static b/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static deleted file mode 100644 index 9e2e31a..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static +++ /dev/null @@ -1 +0,0 @@ -e6981f52e289ac1c \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json b/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json deleted file mode 100644 index ca22feb..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/lazy_static-f48fe6b9096891aa/lib-lazy_static.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13219478138099434326,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.16"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc b/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc deleted file mode 100644 index 635b102..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/dep-lib-libc and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc b/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc deleted file mode 100644 index 27a7c75..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc +++ /dev/null @@ -1 +0,0 @@ -41f8f628ade49c0e \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json b/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json deleted file mode 100644 index a9c8264..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/libc-26843df44dff276e/lib-libc.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17209458132245061813,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.22"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log b/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log deleted file mode 100644 index b051414..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/dep-lib-log and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log b/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log deleted file mode 100644 index e9f3054..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log +++ /dev/null @@ -1 +0,0 @@ -fc8097f85714bf2b \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json b/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json deleted file mode 100644 index e7bcf33..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/log-c7ddfacfd0c43348/lib-log.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15770699670206912575,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.7"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches b/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches deleted file mode 100644 index 92bb92f..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/dep-lib-matches and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches b/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches deleted file mode 100644 index a533c1d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches +++ /dev/null @@ -1 +0,0 @@ -c11ce1bafbf7cb92 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json b/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json deleted file mode 100644 index 0c43998..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/matches-f2ecbea41ee597a8/lib-matches.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15153744203340605494,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr b/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr deleted file mode 100644 index e9a4d7f..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/dep-lib-memchr and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr b/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr deleted file mode 100644 index e9cc30d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr +++ /dev/null @@ -1 +0,0 @@ -1c922aa0a75af3c5 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json b/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json deleted file mode 100644 index bc199cf..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/memchr-00c607621cc2d5ce/lib-memchr.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15077895593472080321,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.11"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime b/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime deleted file mode 100644 index ba0aa45..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/dep-lib-mime and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime b/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime deleted file mode 100644 index dca25c1..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime +++ /dev/null @@ -1 +0,0 @@ -4f53389d6a1c480b \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json b/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json deleted file mode 100644 index cc43eaa..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/mime-ea0879a59386a592/lib-mime.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":735843728989024041,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier b/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier deleted file mode 100644 index 53b6375..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/dep-lib-modifier and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier b/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier deleted file mode 100644 index b04040a..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier +++ /dev/null @@ -1 +0,0 @@ -308e83cf450814c5 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json b/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json deleted file mode 100644 index 48afea1..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/modifier-ad2ce89e0ceb52ce/lib-modifier.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10119508123425398212,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache b/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache deleted file mode 100644 index 53def24..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/dep-lib-mustache and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache b/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache deleted file mode 100644 index dc45951..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache +++ /dev/null @@ -1 +0,0 @@ -d94dc9a0cd9e2df6 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json b/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json deleted file mode 100644 index b16f129..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/mustache-199f7389f1e45b36/lib-mustache.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14579009387232238119,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.6.3"]},"features":"None","deps":[["log v0.3.7",3152260632248025340],["rustc-serialize v0.3.24",12611385045515358938]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel deleted file mode 100644 index 82643dc..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/dep-lib-nickel and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel deleted file mode 100644 index 0e8ee4b..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel +++ /dev/null @@ -1 +0,0 @@ -af9ae5bd1846886a \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json deleted file mode 100644 index 0df8034..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-0cdb11700c2bd93f/lib-nickel.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15913000049418327393,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.9.0"]},"features":"None","deps":[["groupable v0.2.0",16509491291626328228],["hyper v0.9.18",9849564369094637617],["lazy_static v0.1.16",2066177934189631718],["log v0.3.7",3152260632248025340],["modifier v0.1.0",14200984620933287472],["mustache v0.6.3",17739009113285283289],["plugin v0.2.6",5955120726143030526],["regex v0.1.80",1873262728565708009],["rustc-serialize v0.3.24",12611385045515358938],["time v0.1.37",236147470200079797],["typemap v0.3.3",1976382929852212923],["url v1.4.0",44698616916999459]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template deleted file mode 100644 index 3a42aa3..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template +++ /dev/null @@ -1 +0,0 @@ -cfabccdf56309d14 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template.json b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template.json deleted file mode 100644 index c968ec0..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/bin-nickel-template.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":9205755938049617969,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494762330,62131814],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,99,111,100,101,47,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101,45,98,100,99,56,51,57,56,52,100,49,52,48,53,97,55,102,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/dep-bin-nickel-template b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/dep-bin-nickel-template deleted file mode 100644 index ea79ed6..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-bdc83984d1405a7f/dep-bin-nickel-template and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template deleted file mode 100644 index 50c0c91..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template +++ /dev/null @@ -1 +0,0 @@ -f222aeef4680bc94 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template.json b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template.json deleted file mode 100644 index 251943c..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/bin-nickel-template.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2698249217790186441,"profile":11154289914177168617,"local":{"variant":"MtimeBased","fields":[[1494700993,472987098],[47,104,111,109,101,47,118,105,107,105,47,114,117,115,116,95,99,111,111,107,98,111,111,107,47,99,104,97,112,116,101,114,57,47,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101,45,101,97,49,50,101,50,99,57,55,50,100,98,56,101,52,54,47,100,101,112,45,98,105,110,45,110,105,99,107,101,108,45,116,101,109,112,108,97,116,101]]},"features":"None","deps":[["nickel v0.9.0",7676462636932111023]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/dep-bin-nickel-template b/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/dep-bin-nickel-template deleted file mode 100644 index 310e68a..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/nickel-template-ea12e2c972db8e46/dep-bin-nickel-template and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus b/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus deleted file mode 100644 index 28f2ae1..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/dep-lib-num_cpus and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus b/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus deleted file mode 100644 index 4034476..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus +++ /dev/null @@ -1 +0,0 @@ -217ca96f2013e965 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json b/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json deleted file mode 100644 index d194e57..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/num_cpus-c6444bfc064d80da/lib-num_cpus.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14782023287806247981,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin b/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin deleted file mode 100644 index e3929d4..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/dep-lib-plugin and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin b/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin deleted file mode 100644 index 15042fa..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin +++ /dev/null @@ -1 +0,0 @@ -fe5452b4bfd6a452 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json b/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json deleted file mode 100644 index f48986f..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/plugin-45dff0306da4dba8/lib-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12568719763567827515,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.6"]},"features":"None","deps":[["typemap v0.3.3",1976382929852212923]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex b/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex deleted file mode 100644 index 1cfe120..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/dep-lib-regex and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex b/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex deleted file mode 100644 index 9109b24..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex +++ /dev/null @@ -1 +0,0 @@ -e95423d3862aff19 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json b/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json deleted file mode 100644 index 108d9b4..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/regex-6b949f9945bac20b/lib-regex.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12670156471944522085,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.80"]},"features":"None","deps":[["aho-corasick v0.5.3",14256231624314091519],["memchr v0.1.11",14263844120805675548],["regex-syntax v0.3.9",2097099445182631133],["thread_local v0.2.7",2526850940345849094],["utf8-ranges v0.1.3",13231105802975277104]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax b/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax deleted file mode 100644 index 36da95a..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/dep-lib-regex-syntax and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax b/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax deleted file mode 100644 index 98b0bdf..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax +++ /dev/null @@ -1 +0,0 @@ -dd8cc7a0d5641a1d \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json b/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json deleted file mode 100644 index 1246c7a..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/regex-syntax-48ca0b541dad3633/lib-regex-syntax.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":16088928192531196849,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.9"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize b/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize deleted file mode 100644 index 18127ac..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/dep-lib-rustc-serialize and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize b/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize deleted file mode 100644 index ee09ec0..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize +++ /dev/null @@ -1 +0,0 @@ -dad29d83e1a304af \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json b/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json deleted file mode 100644 index aecb95d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/rustc-serialize-27d9a19acac7993b/lib-rustc-serialize.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":6174518519135504061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.24"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version b/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version deleted file mode 100644 index 045771f..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/dep-lib-rustc_version and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version b/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version deleted file mode 100644 index 3366753..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version +++ /dev/null @@ -1 +0,0 @@ -d51c13e4b6e3705a \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json b/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json deleted file mode 100644 index bc529bd..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/rustc_version-891d01c8d2f66f63/lib-rustc_version.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11775201468061381872,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.7"]},"features":"None","deps":[["semver v0.1.20",14856803705703146499]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver b/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver deleted file mode 100644 index 56e8b60..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/dep-lib-semver and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver b/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver deleted file mode 100644 index 1f64aa4..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver +++ /dev/null @@ -1 +0,0 @@ -03a4247041f82dce \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json b/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json deleted file mode 100644 index 80dc3e4..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/semver-a1cf2da55ee5f4e6/lib-semver.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":15063406782213594189,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.20"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit b/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit deleted file mode 100644 index ccde48f..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/dep-lib-solicit and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit b/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit deleted file mode 100644 index 2d7ee12..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit +++ /dev/null @@ -1 +0,0 @@ -27f8214cf839e6f5 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json b/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json deleted file mode 100644 index 69f187f..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/solicit-16723de9bb308797/lib-solicit.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14644760609178290408,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.4"]},"features":"None","deps":[["hpack v0.2.0",5410785256268673003],["log v0.3.7",3152260632248025340]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id b/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id deleted file mode 100644 index e26a6d5..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/dep-lib-thread-id and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id b/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id deleted file mode 100644 index 052e169..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id +++ /dev/null @@ -1 +0,0 @@ -d76319d4a6e9df6a \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json b/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json deleted file mode 100644 index 9cfb3da..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/thread-id-ef8852e88caafd34/lib-thread-id.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12631885209046341097,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["2.0.0"]},"features":"None","deps":[["kernel32-sys v0.2.2",14973637682396376996],["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local b/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local deleted file mode 100644 index 4af1354..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/dep-lib-thread_local and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local b/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local deleted file mode 100644 index bcf2f53..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local +++ /dev/null @@ -1 +0,0 @@ -0615addb8a2d1123 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json b/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json deleted file mode 100644 index 2825f10..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/thread_local-538d80d3b0c720b8/lib-thread_local.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":12399525229491177571,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.7"]},"features":"None","deps":[["thread-id v2.0.0",7701130790559114199]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time b/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time deleted file mode 100644 index 5a750d5..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/dep-lib-time and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time b/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time deleted file mode 100644 index d6c244e..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time +++ /dev/null @@ -1 +0,0 @@ -b505e27bdff64603 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json b/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json deleted file mode 100644 index 4b3cbdf..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/time-711c54e6d87f4104/lib-time.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13679010914831656735,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.37"]},"features":"None","deps":[["libc v0.2.22",1052967845265602625]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject deleted file mode 100644 index 5273249..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject deleted file mode 100644 index b3f5f2f..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -8cadd4f61bbd3c2d \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json deleted file mode 100644 index c9b93d3..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-a8d0a3ac8a1ea66a/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":2215649343267629176,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.0.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject deleted file mode 100644 index 9f8a384..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/dep-lib-traitobject and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject deleted file mode 100644 index 663679c..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject +++ /dev/null @@ -1 +0,0 @@ -fabfa5c0a5a47bdf \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json b/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json deleted file mode 100644 index e556707..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/traitobject-b3e0da3c59cd7ced/lib-traitobject.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":1404587104616339220,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable b/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable deleted file mode 100644 index dc14678..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/dep-lib-typeable and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable b/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable deleted file mode 100644 index 9b5d110..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable +++ /dev/null @@ -1 +0,0 @@ -b397d1b0c99cf1b3 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json b/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json deleted file mode 100644 index c8ff471..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/typeable-2e2fde35af73c8a6/lib-typeable.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":13202766573542040543,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.2"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap b/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap deleted file mode 100644 index 557600b..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/dep-lib-typemap and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap b/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap deleted file mode 100644 index fb4199a..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap +++ /dev/null @@ -1 +0,0 @@ -bba6fca9cd856d1b \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json b/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json deleted file mode 100644 index 5333061..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/typemap-f66f3e60b165b712/lib-typemap.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":11757239868683106182,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.3.3"]},"features":"None","deps":[["unsafe-any v0.4.1",3296955671196002993]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build deleted file mode 100644 index 7e31fd5..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build +++ /dev/null @@ -1 +0,0 @@ -2b5aa3e0785ef9fc \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build deleted file mode 100644 index 51e0a0f..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -a9fa850135674238 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json deleted file mode 100644 index fb84057..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":4086851835445132369,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["rustc_version v0.1.7",6516959035455118549]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json deleted file mode 100644 index fdaf932..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":0,"target":0,"profile":0,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build deleted file mode 100644 index e9a662d..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-build-script-build-script-build and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase deleted file mode 100644 index 98bcf92..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/dep-lib-unicase and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase deleted file mode 100644 index cbb6b4d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase +++ /dev/null @@ -1 +0,0 @@ -c42b754b3b498e25 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json b/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json deleted file mode 100644 index 60ee640..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicase-2e0e5b6194bd80c2/lib-unicase.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":14684722277282784625,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi deleted file mode 100644 index 6ee1e72..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/dep-lib-unicode_bidi and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi deleted file mode 100644 index c90bd4f..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi +++ /dev/null @@ -1 +0,0 @@ -9cc205b9b664365c \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json deleted file mode 100644 index 9c47f39..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-bidi-87ab3b29e032100a/lib-unicode_bidi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":10664899266290688281,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.5"]},"features":"None","deps":[["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization deleted file mode 100644 index 0a47d07..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/dep-lib-unicode-normalization and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization deleted file mode 100644 index 0268800..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization +++ /dev/null @@ -1 +0,0 @@ -a5862017fb20fc9f \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json b/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json deleted file mode 100644 index eaaa5ad..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unicode-normalization-2727210857048561/lib-unicode-normalization.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3481786930638344096,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.4"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any b/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any deleted file mode 100644 index 5fddd05..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/dep-lib-unsafe-any and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any b/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any deleted file mode 100644 index 6ba7a5d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any +++ /dev/null @@ -1 +0,0 @@ -b1ead805b723c12d \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json b/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json deleted file mode 100644 index 7611f5d..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/unsafe-any-89bcc944e0055a3b/lib-unsafe-any.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3115662218412856156,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.4.1"]},"features":"None","deps":[["traitobject v0.1.0",16103645924401987578]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url b/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url deleted file mode 100644 index 7f3e689..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/dep-lib-url and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url b/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url deleted file mode 100644 index 27ec856..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url +++ /dev/null @@ -1 +0,0 @@ -23fd49bf27cd9e00 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json b/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json deleted file mode 100644 index cfdc518..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/url-265e5660b2021a16/lib-url.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3797639690312906588,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["1.4.0"]},"features":"None","deps":[["idna v0.1.1",17878798464614094747],["matches v0.1.4",10577820810353908929]],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges b/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges deleted file mode 100644 index dc32a66..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/dep-lib-utf8-ranges and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges b/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges deleted file mode 100644 index 3eaeb7e..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges +++ /dev/null @@ -1 +0,0 @@ -3070f35ba0549eb7 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json b/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json deleted file mode 100644 index 303d4dc..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/utf8-ranges-c0c68d6c77803563/lib-utf8-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":17624444246549344061,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.3"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi deleted file mode 100644 index f10197b..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/dep-lib-winapi and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi deleted file mode 100644 index 54c3c64..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi +++ /dev/null @@ -1 +0,0 @@ -d4bfd02589333b71 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json deleted file mode 100644 index f4f22b1..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-05520e89b7656dc3/lib-winapi.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":7062486825205066367,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.2.8"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build deleted file mode 100644 index 622c21c..0000000 Binary files a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/dep-lib-build and /dev/null differ diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build deleted file mode 100644 index a8fbb6c..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build +++ /dev/null @@ -1 +0,0 @@ -43461a21489d8bf7 \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json b/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json deleted file mode 100644 index 64a13bc..0000000 --- a/Chapter09/nickel-template/target/debug/.fingerprint/winapi-build-cdb03c7a2d525dd2/lib-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":16218068117412374134,"target":3649318858816229980,"profile":11154289914177168617,"local":{"variant":"Precalculated","fields":["0.1.1"]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/Chapter09/nickel-template/target/debug/_cargo-lock b/Chapter09/nickel-template/target/debug/_cargo-lock deleted file mode 100644 index e69de29..0000000 diff --git a/Chapter09/nickel-template/target/debug/nickel-template b/Chapter09/nickel-template/target/debug/nickel-template deleted file mode 100644 index 484cbfd..0000000 Binary files a/Chapter09/nickel-template/target/debug/nickel-template and /dev/null differ diff --git a/Chapter09/reading-hardware/Cargo.toml b/Chapter09/reading-hardware/Cargo.toml new file mode 100644 index 0000000..2936f73 --- /dev/null +++ b/Chapter09/reading-hardware/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "reading-hardware" +version = "0.1.0" +authors = ["Claus Matzinger "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/Chapter09/reading-hardware/src/main.rs b/Chapter09/reading-hardware/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/Chapter09/reading-hardware/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}