mthom / scryer-prolog

A modern Prolog implementation written mostly in Rust.
BSD 3-Clause "New" or "Revised" License
2.01k stars 117 forks source link

ADDED: meta_predicate/1 declarations for (',')//2 and (;)//2 #2367

Closed triska closed 6 months ago

triska commented 6 months ago

This addresses #2366.

mthom commented 6 months ago

Looks good! Oddly the style check is failing now.

triska commented 6 months ago

I also do not know why the style checks are failing! @gruhn, could you please help with this issue if possible? Thank you a lot!

triska commented 6 months ago

@mthom: The error message says:

error: read amount is not handled
   --> src/parser/char_reader.rs:332:13
    |
332 |             (&self.buf[self.pos..]).read_vectored(bufs)?
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
    = note: `#[deny(clippy::unused_io_amount)]` on by default

warning: match expression looks like `matches!` macro
   --> src/machine/machine_indices.rs:301:56
    |
301 |                       meta_specs.iter().find(|meta_spec| match meta_spec {
    |  ________________________________________________________^
302 | |                         MetaSpec::Colon | MetaSpec::RequiresExpansionWithArgument(_) => true,
303 | |                         _ => false,
304 | |                     })
    | |_____________________^ help: try: `matches!(meta_spec, MetaSpec::Colon | MetaSpec::RequiresExpansionWithArgument(_))`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
    = note: `#[warn(clippy::match_like_matches_macro)]` on by default
mthom commented 6 months ago

But it is 'handled', it's passed to a function and then returned. Very curious.

gruhn commented 6 months ago

Hmm, I didn't set up this GitHub action. No idea what these Rust errors mean. I could look into it but your guess is as good as mine :thinking:

triska commented 6 months ago

The current HEAD commit (40fc4f939261a4dbdc73ef69991fc5d2a4d2bb4e) yields the same problem, so at least this PR would not be a regression.