Use Self instead of repeating the type name.
This commit is contained in:
@@ -35,8 +35,8 @@ struct TextSink {
|
||||
|
||||
impl TextSink {
|
||||
/// Create a new empty TextSink.
|
||||
pub fn new(isa: &TargetIsa) -> TextSink {
|
||||
TextSink {
|
||||
pub fn new(isa: &TargetIsa) -> Self {
|
||||
Self {
|
||||
rnames: isa.reloc_names(),
|
||||
offset: 0,
|
||||
text: String::new(),
|
||||
|
||||
@@ -38,7 +38,7 @@ pub struct ConcurrentRunner {
|
||||
|
||||
impl ConcurrentRunner {
|
||||
/// Create a new `ConcurrentRunner` with threads spun up.
|
||||
pub fn new() -> ConcurrentRunner {
|
||||
pub fn new() -> Self {
|
||||
let (request_tx, request_rx) = channel();
|
||||
let request_mutex = Arc::new(Mutex::new(request_rx));
|
||||
let (reply_tx, reply_rx) = channel();
|
||||
@@ -51,7 +51,7 @@ impl ConcurrentRunner {
|
||||
})
|
||||
.collect();
|
||||
|
||||
ConcurrentRunner {
|
||||
Self {
|
||||
request_tx: Some(request_tx),
|
||||
reply_rx,
|
||||
handles,
|
||||
|
||||
@@ -81,8 +81,8 @@ pub struct TestRunner {
|
||||
|
||||
impl TestRunner {
|
||||
/// Create a new blank TrstRunner.
|
||||
pub fn new(verbose: bool) -> TestRunner {
|
||||
TestRunner {
|
||||
pub fn new(verbose: bool) -> Self {
|
||||
Self {
|
||||
verbose,
|
||||
dir_stack: Vec::new(),
|
||||
tests: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user