Upgrade to Rust 1.17.
- Remove some uses of 'static in const and static globals that are no longer needed. - Use the new struct initialization shorthand.
This commit is contained in:
@@ -17,7 +17,7 @@ mod cat;
|
||||
mod print_cfg;
|
||||
mod rsfilecheck;
|
||||
|
||||
const USAGE: &'static str = "
|
||||
const USAGE: &str = "
|
||||
Cretonne code generator utility
|
||||
|
||||
Usage:
|
||||
|
||||
@@ -51,8 +51,8 @@ impl ConcurrentRunner {
|
||||
|
||||
ConcurrentRunner {
|
||||
request_tx: Some(request_tx),
|
||||
reply_rx: reply_rx,
|
||||
handles: handles,
|
||||
reply_rx,
|
||||
handles,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,10 +120,7 @@ fn worker_thread(thread_num: usize,
|
||||
// Tell them we're starting this job.
|
||||
// The receiver should always be present for this as long as we have jobs.
|
||||
replies
|
||||
.send(Reply::Starting {
|
||||
jobid: jobid,
|
||||
thread_num: thread_num,
|
||||
})
|
||||
.send(Reply::Starting { jobid, thread_num })
|
||||
.unwrap();
|
||||
|
||||
let result = catch_unwind(|| runone::run(path.as_path())).unwrap_or_else(|e| {
|
||||
@@ -142,12 +139,7 @@ fn worker_thread(thread_num: usize,
|
||||
dbg!("FAIL: {}", msg);
|
||||
}
|
||||
|
||||
replies
|
||||
.send(Reply::Done {
|
||||
jobid: jobid,
|
||||
result: result,
|
||||
})
|
||||
.unwrap();
|
||||
replies.send(Reply::Done { jobid, result }).unwrap();
|
||||
}
|
||||
})
|
||||
.unwrap()
|
||||
|
||||
@@ -81,7 +81,7 @@ impl TestRunner {
|
||||
/// Create a new blank TrstRunner.
|
||||
pub fn new(verbose: bool) -> TestRunner {
|
||||
TestRunner {
|
||||
verbose: verbose,
|
||||
verbose,
|
||||
dir_stack: Vec::new(),
|
||||
tests: Vec::new(),
|
||||
new_tests: 0,
|
||||
|
||||
@@ -55,9 +55,9 @@ pub fn run(path: &Path) -> TestResult {
|
||||
for (func, details) in testfile.functions {
|
||||
let mut context = Context {
|
||||
preamble_comments: &testfile.preamble_comments,
|
||||
details: details,
|
||||
details,
|
||||
verified: false,
|
||||
flags: flags,
|
||||
flags,
|
||||
isa: None,
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ struct CFGPrinter<'a> {
|
||||
impl<'a> CFGPrinter<'a> {
|
||||
pub fn new(func: &'a Function) -> CFGPrinter<'a> {
|
||||
CFGPrinter {
|
||||
func: func,
|
||||
func,
|
||||
cfg: ControlFlowGraph::with_function(func),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user