Commit 99544e42 authored by Ben Boeckel's avatar Ben Boeckel

clippy: use Self where possible

parent ce058b5a
Pipeline #80624 passed with stage
......@@ -60,7 +60,7 @@ impl Identity {
where N: ToString,
E: ToString,
{
Identity {
Self {
name: name.to_string(),
email: email.to_string(),
}
......@@ -107,7 +107,7 @@ impl GitContext {
pub fn new<P>(gitdir: P) -> Self
where P: AsRef<Path>,
{
GitContext {
Self {
gitdir: gitdir.as_ref().to_path_buf(),
config: None,
}
......@@ -118,7 +118,7 @@ impl GitContext {
where P: AsRef<Path>,
C: AsRef<Path>,
{
GitContext {
Self {
gitdir: gitdir.as_ref().to_path_buf(),
config: Some(config.as_ref().to_path_buf()),
}
......
......@@ -273,7 +273,7 @@ impl PreparingGitWorkArea {
let tempdir = TempDir::new_in(context.gitdir(), "git-work-area")
.chain_err(|| "failed to create temporary directory")?;
let workarea = PreparingGitWorkArea {
let workarea = Self {
context: context,
dir: tempdir,
};
......@@ -404,7 +404,7 @@ impl GitWorkArea {
pub fn new(context: GitContext, rev: &CommitId) -> Result<Self> {
let intermediate = PreparingGitWorkArea::new(context, rev)?;
let workarea = GitWorkArea {
let workarea = Self {
submodule_config: intermediate.query_submodules()?,
context: intermediate.context,
dir: intermediate.dir,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment