Skip to content

Commit

Permalink
Fix clippy (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbierlee committed Jan 22, 2025
1 parent 5b0f8c6 commit 26144a7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crates/pindakaas/src/integer/scm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ use std::str::FromStr;
use super::model::Scm;
use crate::Cnf;

// Preventing clippy errors this way, since adding #[allow(clippy::all)] didn't work immediately.

#[cfg(not(clippy))]
include!(concat!(env!("OUT_DIR"), "/scm_db.rs"));

#[cfg(clippy)]
pub(crate) const SCM: ScmDB = ScmDB {
scm: phf::Map::new(),
ecm: phf::Map::new(),
};

#[derive(Debug, Clone)]
pub(super) struct ScmNode {
pub i: usize,
Expand All @@ -15,11 +24,6 @@ pub(super) struct ScmNode {
pub sh2: u32,
}

// const SCM: ScmDB = ScmDB {
// scm: phf::Map::new(),
// ecm: phf::Map::new(),
// };

// TODO move to new scm.rs module
impl ScmDB {
pub(crate) fn get(&self, lits: usize, c: i64, scm: &Scm) -> Option<&[ScmNode]> {
Expand All @@ -40,7 +44,7 @@ impl ScmDB {
}
}

#[derive(Debug, Default)]
#[derive(Debug)]
pub(crate) struct ScmDB {
pub(crate) scm: phf::Map<&'static str, &'static [ScmNode]>,
pub(crate) ecm: phf::Map<&'static str, &'static str>,
Expand Down

0 comments on commit 26144a7

Please sign in to comment.