mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1488006: mozprofile: avoid redundant field names in struct init; r=jgraham
This commit is contained in:
parent
6064b9610a
commit
4cf5f38cc9
@ -17,9 +17,9 @@ impl PrefReaderError {
|
||||
parent: Option<Box<Error>>,
|
||||
) -> PrefReaderError {
|
||||
PrefReaderError {
|
||||
message: message,
|
||||
position: position,
|
||||
parent: parent,
|
||||
message,
|
||||
position,
|
||||
parent,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -157,11 +157,11 @@ struct TokenData<'a> {
|
||||
impl<'a> TokenData<'a> {
|
||||
fn new(token_type: TokenType, position: Position, start_pos: usize) -> TokenData<'a> {
|
||||
TokenData {
|
||||
token_type: token_type,
|
||||
token_type,
|
||||
complete: false,
|
||||
position: position,
|
||||
position,
|
||||
data: Cow::Borrowed(""),
|
||||
start_pos: start_pos,
|
||||
start_pos,
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ pub struct PrefTokenizer<'a> {
|
||||
impl<'a> PrefTokenizer<'a> {
|
||||
pub fn new(data: &'a [u8]) -> PrefTokenizer<'a> {
|
||||
PrefTokenizer {
|
||||
data: data,
|
||||
data,
|
||||
pos: 0,
|
||||
cur: None,
|
||||
position: Position::new(),
|
||||
|
@ -29,8 +29,8 @@ impl Profile {
|
||||
};
|
||||
|
||||
Ok(Profile {
|
||||
path: path,
|
||||
temp_dir: temp_dir,
|
||||
path,
|
||||
temp_dir,
|
||||
prefs: None,
|
||||
user_prefs: None,
|
||||
})
|
||||
@ -74,10 +74,7 @@ impl PrefFile {
|
||||
parse(buf.as_bytes())?
|
||||
};
|
||||
|
||||
Ok(PrefFile {
|
||||
path: path,
|
||||
prefs: prefs,
|
||||
})
|
||||
Ok(PrefFile { path, prefs })
|
||||
}
|
||||
|
||||
pub fn write(&self) -> IoResult<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user