Use more Self keywords instead of repeating the type name.
This commit is contained in:
@@ -300,8 +300,8 @@ pub struct VectorType {
|
||||
|
||||
impl VectorType {
|
||||
/// Initialize a new integer type with `n` bits.
|
||||
pub fn new(base: LaneType, lanes: u64) -> VectorType {
|
||||
VectorType { base, lanes }
|
||||
pub fn new(base: LaneType, lanes: u64) -> Self {
|
||||
Self { base, lanes }
|
||||
}
|
||||
|
||||
/// Return a string containing the documentation comment for this vector type.
|
||||
|
||||
@@ -38,8 +38,8 @@ pub struct Formatter {
|
||||
impl Formatter {
|
||||
/// Source code formatter class. Used to collect source code to be written
|
||||
/// to a file, and keep track of indentation.
|
||||
pub fn new() -> Formatter {
|
||||
Formatter {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
indent: 0,
|
||||
lines: Vec::new(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user