Skip to content

Commit

Permalink
applying clippy suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Reto Achermann <[email protected]>
  • Loading branch information
achreto committed Jul 9, 2024
1 parent 10c40b4 commit 1ae662d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/rosettelang/src/symbolic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct SymbolicVar {
ident: String,
/// the struct attributes
ty: String,
///
/// the optional size of the symbolic variable
len: Option<usize>,
}

Expand Down
2 changes: 1 addition & 1 deletion lib/velosiast/src/ast/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub enum VelosiAstTypeInfo {
Interface,
/// No type
Void,
///
/// this is the self-type reference
SelfType,
}

Expand Down
2 changes: 1 addition & 1 deletion lib/velosiast/src/ast/unit/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub struct VelosiAstUnitSegment {
pub state: Rc<VelosiAstState>,
/// the interface of the unit
pub interface: Rc<VelosiAstInterface>,
///
/// constants defined in the unit context
pub consts: IndexMap<String, Rc<VelosiAstConst>>,

pub flags: Option<Rc<VelosiAstFlags>>,
Expand Down
2 changes: 1 addition & 1 deletion lib/velosiast/src/ast/unit/staticmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub struct VelosiAstUnitStaticMap {
pub inbitwidth: u64,
pub outbitwidth: u64,

///
/// constants defined in the unit context
pub consts: IndexMap<String, Rc<VelosiAstConst>>,

pub methods: IndexMap<String, Rc<VelosiAstMethod>>,
Expand Down
2 changes: 1 addition & 1 deletion lib/velosihwgen/src/fastmodels/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn next_unit(unit: &VelosiAstUnit) -> Option<&Rc<String>> {
.and_then(|pa| pa.ptype.typeref())
}

fn state_field_access(access: &Vec<&str>, unit: Option<&C::Expr>) -> C::Expr {
fn state_field_access(access: &[&str], unit: Option<&C::Expr>) -> C::Expr {
let st = if let Some(unit) = unit {
C::Expr::field_access(unit, "state")
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/velosisynth/src/vmops/queries/programsimplifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use super::ProgramBuilder;
pub struct ProgramSimplifier {
/// the programs that this query builder handles
programs: Box<dyn ProgramBuilder>,
///
/// an unoptimized program
unoptimized: Option<Program>,
// assms: Rc<Vec<Term>>,
// m_op: Rc<VelosiAstMethod>,
Expand Down
2 changes: 1 addition & 1 deletion lib/velosisynth/src/vmops/queries/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ use crate::DEFAULT_BATCH_SIZE;
/// The program verifier takes the programs that are generated by the program builder and submits
/// the queries to Z3 for verification. It does submit a batch of queries at a time.
pub struct ProgramVerifier {
///
/// prefix of the methods etc
prefix: Rc<String>,
/// sequence of queries to be submitted
programs: Box<dyn ProgramBuilder>,
Expand Down
4 changes: 2 additions & 2 deletions lib/velosisynth/src/z3/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub enum Z3TimeStamp {
SendCmd,
/// solver execution completed
SolverDone,
///
/// checks done for this query
Done,
}

Expand Down Expand Up @@ -119,7 +119,7 @@ pub struct Z3Query {
smt: Vec<Arc<Smt2Context>>,
/// time durations for tracing
timestamps: Vec<(Z3TimeStamp, Instant)>,
///
/// whether the query is a complex one
is_complex: bool,
/// the time to life value
retries: usize,
Expand Down
2 changes: 1 addition & 1 deletion lib/velosisynth/src/z3/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl Z3Worker {
self.reset.store(true, Ordering::Relaxed);
}

///
/// wait until the reset is done
pub fn wait_reset_done(&mut self) {
while self.reset.load(Ordering::Relaxed) {
thread::yield_now();
Expand Down

0 comments on commit 1ae662d

Please sign in to comment.