Skip to content

Commit

Permalink
Remove all compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
acatton authored and aep committed Dec 19, 2020
1 parent 921e1ef commit 71f43e9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
18 changes: 10 additions & 8 deletions src/abs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -946,16 +946,18 @@ pub fn abs(
scope.insert(ast.name.clone(), ns, &ast.loc, false, true);
}
ast::Def::Enum { names, .. } => {
let mut value = 0;
for (_, val) in names.iter_mut() {
if let Some(val) = val {
value = *val;
} else {
*val = Some(value);
{
let mut value = 0;
for (_, val) in names.iter_mut() {
if let Some(val) = val {
value = *val;
} else {
*val = Some(value);
}
value += 1;
}
value += 1;
}
for (name, value) in names {
for (name, _value) in names {
let subname = format!("{}::{}", ast.name, name);

//new_locals.push(ast::Local {
Expand Down
1 change: 0 additions & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use std::path::Path;
use std::path::PathBuf;
use std::sync::atomic::Ordering;
use std::sync::{Arc, Mutex};
use std::io::Write;

#[derive(Clone)]
pub enum Module {
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ fn main() {
let variant = submatches.value_of("variant").unwrap_or("default");
let stage = zz::make::Stage::test();
zz::build(zz::BuildSet::Tests, variant, stage.clone(), false);
let (root, mut project) = zz::project::load_cwd();
let (_root, mut project) = zz::project::load_cwd();

for artifact in std::mem::replace(&mut project.artifacts, None).expect("no artifacts") {
if let zz::project::ArtifactType::Test = artifact.typ {
Expand Down Expand Up @@ -363,7 +363,7 @@ fn main() {
};
let variant = submatches.value_of("variant").unwrap_or("default");
zz::build(zz::BuildSet::Run, variant, stage.clone(), false);
let (root, mut project) = zz::project::load_cwd();
let (_root, mut project) = zz::project::load_cwd();

let mut exes = Vec::new();
for artifact in std::mem::replace(&mut project.artifacts, None).expect("no artifacts") {
Expand Down Expand Up @@ -395,7 +395,7 @@ fn main() {
let variant = submatches.value_of("variant").unwrap_or("default");
let stage = zz::make::Stage::fuzz();
zz::build(zz::BuildSet::Tests, variant, stage.clone(), false);
let (root, mut project) = zz::project::load_cwd();
let (_root, mut project) = zz::project::load_cwd();

let mut exes = Vec::new();
for artifact in std::mem::replace(&mut project.artifacts, None).expect("no artifacts") {
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl Pipeline {
fn pb_reset(&self) {
let mut pb = pbr::ProgressBar::new(self.modules.len() as u64);
pb.show_speed = false;
std::mem::replace(&mut *self.pb.lock().unwrap(), pb);
let _ = std::mem::replace(&mut *self.pb.lock().unwrap(), pb);
}

fn pb_doing(&self, action: &str, on: String) {
Expand Down

0 comments on commit 71f43e9

Please sign in to comment.