Adopt field init shorthand in a few places

Found by running 'egrep "(\b[a-zA-Z]+): \1\b" -R src'
This commit is contained in:
est31 2019-09-01 23:39:59 +02:00
parent 9e17b937c3
commit 8504c7a8e6
7 changed files with 10 additions and 10 deletions

View File

@ -168,7 +168,7 @@ impl CommandArgs {
Ok(RunnableArgs {
args: T::deserialize(&mut deserializer)?,
context: RunnableContext {
input: input,
input,
commands: registry.clone(),
shell_manager,
name: name_span,
@ -201,7 +201,7 @@ impl CommandArgs {
Ok(RunnableRawArgs {
args: T::deserialize(&mut deserializer)?,
context: RunnableContext {
input: input,
input,
commands: registry.clone(),
shell_manager,
name: name_span,

View File

@ -109,7 +109,7 @@ impl PerItemCommand for Enter {
})) => {
yield Ok(ReturnSuccess::Action(CommandAction::EnterValueShell(
Tagged {
item: item,
item,
tag: contents_tag,
})));
}

View File

@ -113,7 +113,7 @@ fn run(
}
}
Ok(ReturnSuccess::Value(Tagged { item, .. })) => {
yield Ok(ReturnSuccess::Value(Tagged { item: item, tag: contents_tag }));
yield Ok(ReturnSuccess::Value(Tagged { item, tag: contents_tag }));
}
x => yield x,
}

View File

@ -123,7 +123,7 @@ fn run(
}
}
Ok(ReturnSuccess::Value(Tagged { item, .. })) => {
yield Ok(ReturnSuccess::Value(Tagged { item: item, tag: contents_tag }));
yield Ok(ReturnSuccess::Value(Tagged { item, tag: contents_tag }));
}
x => yield x,
}

View File

@ -101,8 +101,8 @@ fn save(
let command_name = format!("to-{}", extension.to_str().unwrap());
if let Some(converter) = registry.get_command(&command_name) {
let new_args = RawCommandArgs {
host: host,
shell_manager: shell_manager,
host,
shell_manager,
call_info: UnevaluatedCallInfo {
args: crate::parser::hir::Call {
head: raw_args.call_info.args.head,

View File

@ -140,7 +140,7 @@ impl ShellError {
ProximateShellError::ArgumentError {
command: command.into(),
error: kind,
span: span,
span,
}
.start()
}

View File

@ -278,8 +278,8 @@ struct StructDeserializer<'a, 'de: 'a> {
impl<'a, 'de: 'a> StructDeserializer<'a, 'de> {
fn new(de: &'a mut ConfigDeserializer<'de>, fields: &'static [&'static str]) -> Self {
StructDeserializer {
de: de,
fields: fields,
de,
fields,
}
}
}