fmt: remove .rustfmt.toml

The formatting configuration is not worth the maintenance of a nightly
version. Remove it and allow the default formatting to be used
instead.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2024-03-13 14:11:36 +00:00
parent 53c31312e0
commit f4a958010c
33 changed files with 92 additions and 196 deletions
+9 -12
View File
@@ -16,12 +16,9 @@ use git_ext::{
use crate::{
odb,
refdb::{
self,
resolve,
self, resolve,
write::{previous, Applied, Policy, SymrefTarget, Update, Updated},
Read as _,
Reference,
Target,
Read as _, Reference, Target,
},
signature::UserInfo,
};
@@ -67,7 +64,7 @@ impl Write {
.external_template(false),
)?;
Ok(backend)
},
}
Ok(repo) => Ok(repo),
Err(e) => Err(e),
}?;
@@ -225,7 +222,7 @@ impl<'a> Transaction<'a> {
} else {
None
}
},
}
None => None,
};
@@ -289,7 +286,7 @@ impl<'a> Transaction<'a> {
Some(src) => match src.target {
Target::Direct { .. } if matches!(type_change, Policy::Abort) => {
Err(error::Update::TypeChange(name.into()))
},
}
Target::Direct { .. } if matches!(type_change, Policy::Reject) => {
Ok(Either::Left(Update::Symbolic {
name,
@@ -298,7 +295,7 @@ impl<'a> Transaction<'a> {
previous,
reflog,
}))
},
}
_ => {
let dst = self.refdb.find_reference(&target.name)?;
match dst {
@@ -309,14 +306,14 @@ impl<'a> Transaction<'a> {
Ok(Either::Right(
self.symbolic_edit(name, target, prev, &reflog, is_ff)?,
))
},
}
Target::Symbolic { .. } => Err(error::Update::TargetSymbolic(dst.name)),
},
None => Ok(Either::Right(
self.symbolic_edit(name, target, prev, &reflog, true)?,
)),
}
},
}
},
None => Ok(Either::Right(
self.symbolic_edit(name, target, prev, &reflog, true)?,
@@ -355,7 +352,7 @@ impl<'a> Transaction<'a> {
match given {
None => {
panic!("BUG: the previous value for a reference to be removed was not given, but its existence SHOULD be guarded")
},
}
Some(previous) => Ok(Either::Right(self.remove_edit(name, previous)?)),
}
}
+1 -1
View File
@@ -60,7 +60,7 @@ impl<'a> TryFrom<git2::Reference<'a>> for Reference {
.ok_or(ParseReference::InvalidUtf8)
.and_then(|name| RefString::try_from(name).map_err(ParseReference::from))?;
name.into()
},
}
Some(oid) => oid.into(),
};
+1 -1
View File
@@ -37,7 +37,7 @@ impl<'a, G: glob::Pattern + Debug> Iterator for ReferencesGlob<'a, G> {
Ok(reference) => match reference.name() {
Some(name) if self.glob.matches(name) => {
return Some(Reference::try_from(reference).map_err(error::Iter::from))
},
}
_ => continue,
},
+3 -3
View File
@@ -55,14 +55,14 @@ impl Edit {
} else {
Ok(())
}
},
}
Self::MustNotExist => {
if given.is_some() {
Err(DoesExist)
} else {
Ok(())
}
},
}
Self::MustExistAndMatch(expected) => match given {
Some(given) if &given == expected => Ok(()),
Some(given) => Err(DoesNotMatch {
@@ -118,7 +118,7 @@ impl Remove {
} else {
Ok(())
}
},
}
Self::MustExistAndMatch(expected) => match given {
Some(given) if &given == expected => Ok(()),
Some(given) => Err(DoesNotMatch {