blinry / habitctl

Minimalist command line tool you can use to track and examine your habits.
363 stars 24 forks source link

Cannot compile on Kubuntu 18.04 #3

Closed DDzwiedziu closed 5 years ago

DDzwiedziu commented 5 years ago
$snip/habitctl git:(master) git pull
Already up to date.
$snip/habitctl git:(master) cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading dirs v1.0.3
 Downloading rprompt v1.0.3
 Downloading clap v2.32.0
 Downloading open v1.2.2
 Downloading chrono v0.4.6
 Downloading unicode-width v0.1.5
 Downloading textwrap v0.10.0
 Downloading atty v0.2.11
 Downloading bitflags v1.0.4
 Downloading vec_map v0.8.1
 Downloading strsim v0.7.0
 Downloading time v0.1.40
 Downloading num-integer v0.1.39
 Downloading num-traits v0.2.6
 Downloading libc v0.2.43
 Downloading ansi_term v0.11.0
   Compiling rprompt v1.0.3
   Compiling unicode-width v0.1.5
   Compiling open v1.2.2
   Compiling vec_map v0.8.1
   Compiling strsim v0.7.0
   Compiling libc v0.2.43
   Compiling num-traits v0.2.6
   Compiling bitflags v1.0.4
   Compiling num-integer v0.1.39
   Compiling ansi_term v0.11.0
   Compiling textwrap v0.10.0
   Compiling time v0.1.40
   Compiling dirs v1.0.3
   Compiling atty v0.2.11
   Compiling clap v2.32.0
   Compiling chrono v0.4.6
   Compiling habitctl v0.1.0 (file://$snip/habitctl)
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:346:45
    |
346 |                 if let Some(_) = iter.find(|(date, _value)| date == todo_date) {
    |                                             ^^^^^^^^^^^^^^ help: consider using a reference: `&(date, _value)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:411:13
    |
411 |             DayStatus::Unknown => "•",
    |             ^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&DayStatus::Unknown`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:412:13
    |
412 |             DayStatus::NotDone => " ",
    |             ^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&DayStatus::NotDone`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:413:13
    |
413 |             DayStatus::Done => "━",
    |             ^^^^^^^^^^^^^^^ help: consider using a reference: `&DayStatus::Done`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:414:13
    |
414 |             DayStatus::Satisfied => "─",
    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&DayStatus::Satisfied`

error: aborting due to 5 previous errors

error: Could not compile `habitctl`.

To learn more, run the command again with --verbose.

Tried "consider using a reference", but it shows how much I don't know rust .)

L3viathan commented 5 years ago

This also occurs on Debian Jessie.

blinry commented 5 years ago

Thanks for reporting the issue! Which Rust version are you using?

L3viathan commented 5 years ago

Should have checked that first; for me that was the issue; I was running 1.24.1.

Works on 1.30.1.

blinry commented 5 years ago

Yeah, Rust is moving fast! :O I clarified that you need an up-to-date Rust version in 1f1d2ef. :) @DDzwiedziu, can you check whether updating Rust solves this problem for you, as well?

DDzwiedziu commented 5 years ago

Yep. OOTB now.

EDIT: I'm unsure about the definition of up-to-date, but this is a complex issue on what is considered "up-to-date". Maybe a version would work better there?