Skip to content

Commit

Permalink
Clean up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaj committed May 22, 2024
1 parent 612194a commit 18cef21
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust/origen/src/core/model/registers/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ impl Register {
lineno: lineno,
};
if self.fields.contains_key(name) {
let mut orig = self.fields.get_mut(name).unwrap();
let orig = self.fields.get_mut(name).unwrap();
orig.related_fields += 1;
let key = format!("{}{}", name, orig.related_fields);
self.fields.insert(key.clone(), f);
Expand Down
4 changes: 2 additions & 2 deletions rust/origen/src/generator/processors/cycle_combiner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl Processor<PAT> for UnpackCaptures {
let mut finished_overlays: Vec<(Option<usize>, Option<String>)> = vec![];

// Decrease the cycle count for all captures
for (pin_id, mut cap) in self.capturing.iter_mut() {
for (pin_id, cap) in self.capturing.iter_mut() {
if cap.0 <= this_repeat {
// This capture will be exhausted by the end of this node
// Remove it from the list to capture
Expand All @@ -242,7 +242,7 @@ impl Processor<PAT> for UnpackCaptures {
}

// Do the same for overlays
for (pin_id, mut ovl) in self.overlaying.iter_mut() {
for (pin_id, ovl) in self.overlaying.iter_mut() {
if ovl.0 <= this_repeat {
// This overlay will be exhausted by the end of this node
// Remove it from the list to overlay
Expand Down
4 changes: 2 additions & 2 deletions rust/origen/src/prog_gen/model/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ impl Test {
constraints: IndexMap::new(),
tester: tester,
class_name: None,
/// If the test is modelling an invocation then this will reflect the ID of the
/// test being invoked
// If the test is modelling an invocation then this will reflect the ID of the
// test being invoked
test_id: None,
sub_tests: vec![],
number: None,
Expand Down
2 changes: 1 addition & 1 deletion rust/origen/src/prog_gen/processors/final_model_extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Processor<PGM> for ExtractToModel {
};
collection.insert(*number, b);
} else {
let mut b = collection.get_mut(number).unwrap();
let b = collection.get_mut(number).unwrap();
if let Some(d) = description {
b.description = Some(d.to_owned());
}
Expand Down
2 changes: 1 addition & 1 deletion rust/origen/src/utility/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn setup_sessions() -> om::Result<()> {
log_trace!("Setting up user session...");
if let Some(r) = &ORIGEN_CONFIG.session__user_root {
let mut users = om::users_mut();
let mut sc = users.default_session_config_mut();
let sc = users.default_session_config_mut();
sc.root = Some(PathBuf::from(r));
}

Expand Down
1 change: 0 additions & 1 deletion rust/origen_metal/src/ast/ast.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub use super::node::Meta;
pub use super::node::{Attrs, Node};
//use crate::generator::TestManager;
//use crate::TEST;
Expand Down

0 comments on commit 18cef21

Please sign in to comment.