title: How do I use Itertools to create all combinations of a range of Chrono dates?
body: <p>I'm trying to generate all combinations of a date range using <a href="https://docs.rs/itertools/0.7.8/itertools/trait.Itertools.html#method.combinations" rel="nofollow noreferrer">Rust itertools</a> but it says that trait bounds were not satisfied.</p>
  
  <pre><code>extern crate chrono;
  extern crate itertools;
  
  use itertools::Itertools;
  use chrono::prelude::*;
  
  fn main() {
      let min = NaiveDate::from_ymd(2018, 10, 1);
      let max = NaiveDate::from_ymd(2018, 10, 14);
      let combinations = (min..=max).combinations(5);
  }
  </code></pre>
  
  <p>The error message:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0599]: no method named `combinations` found for type `std::ops::RangeInclusive&lt;chrono::NaiveDate&gt;` in the current scope
    --&gt; src/main.rs:46:36
     |
  46 |     let combinations = (min..=max).combinations(5);
     |                                    ^^^^^^^^^^^^
     |
     = note: the method `combinations` exists but the following trait bounds were not satisfied:
             `std::ops::RangeInclusive&lt;chrono::NaiveDate&gt; : itertools::Itertools`
             `&amp;std::ops::RangeInclusive&lt;chrono::NaiveDate&gt; : itertools::Itertools`
             `&amp;mut std::ops::RangeInclusive&lt;chrono::NaiveDate&gt; : itertools::Itertools`
  </code></pre>
  
  <p>I would expect that <code>Itertools</code> were implemented for generic <code>RangeInclusive</code>. I am learning Rust so I might be missing something obvious.</p>