Use more Self keywords instead of repeating the type name.

This commit is contained in:
Dan Gohman
2018-10-05 16:40:50 -07:00
parent 9a1e966156
commit 17a9631981
16 changed files with 40 additions and 58 deletions

View File

@@ -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.