thepigeonoftime / skimr

Recursive web scraper in Rust
MIT License
1 stars 0 forks source link

compilation issue with nightly #1

Open barzilouik opened 4 years ago

barzilouik commented 4 years ago

The compilation with the nightly compiler 1.43.0 / ubuntu 18.04 aborts with this error message :

error[E0506]: cannot assign to `self.input.cached_token` because it is borrowed
   --> /home/vincent/.cargo/registry/src/github.com-1ecc6299db9ec823/cssparser-0.24.1/src/parser.rs:572:17
    |
547 |     pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> {
    |                                                   - let's call the lifetime of this reference `'1`
...
560 |             Some(ref cached_token)
    |                  ---------------- borrow of `self.input.cached_token` occurs here
...
572 |                 self.input.cached_token = Some(CachedToken {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here
...
584 |         Ok(token)
    |         --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1`

Just to let know that the code isn't valid at this point of time.

thepigeonoftime commented 4 years ago

Thanks for this, seems it was a problem within the scraper crate, I've updated it to the last version at it compiles for me again. See if it works for you now.