Skip to content

Commit

Permalink
Globally allow refining_impl_trait in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MDLC01 committed Jul 22, 2024
1 parent 1a705e4 commit 6438890
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion plugin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(refining_impl_trait)]

mod fen;
mod model;
mod pgn;
Expand Down Expand Up @@ -43,7 +45,7 @@ pub fn replay_game(starting_position: &[u8], turns: &[u8]) -> Result<Vec<u8>> {
#[wasm_func]
pub fn game_from_pgn(pgn: &[u8]) -> Result<Vec<u8>> {
let Ok(pgn) = std::str::from_utf8(pgn) else {
// The specification actually requires that PGN used ASCII, but we allow UTF-8 because this
// The specification actually requires that PGN uses ASCII, but we allow UTF-8 because this
// is today's world standard.
Err("internal error: PGN should be a valid UTF-8 string")?
};
Expand Down
2 changes: 0 additions & 2 deletions plugin/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ impl File {
}

impl Finite for File {
#[allow(refining_impl_trait)]
fn values() -> [Self; 8] {
[
Self::A,
Expand Down Expand Up @@ -168,7 +167,6 @@ impl Rank {
}

impl Finite for Rank {
#[allow(refining_impl_trait)]
fn values() -> [Self; 8] {
[
Self::One,
Expand Down
2 changes: 0 additions & 2 deletions plugin/src/san.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ pub enum Mark {
}

impl Finite for Mark {
#[allow(refining_impl_trait)]
fn values() -> [Self; 2] {
[Self::Check, Self::Checkmate]
}
Expand All @@ -732,7 +731,6 @@ pub enum Annotation {
}

impl Finite for Annotation {
#[allow(refining_impl_trait)]
fn values() -> [Self; 6] {
[
Self::Blunder,
Expand Down

0 comments on commit 6438890

Please sign in to comment.