History

thanks clippy

Sebastian Thiel committed 4 years ago

Commit bc9c7801 parent 547e4501 file · +3 −3Browse files

Unified · Split

git-protocol/src/fetch/refs/shared.rs+3−3
@@ -190,14 +190,14 @@ pub(in crate::fetch::refs) fn parse_v2(line: &str) -> Result<Ref, Error> { · 189 unmodified lines
190190 "peeled" => Ref::Peeled {
191191 full_ref_name: path.into(),
192192 object: git_hash::ObjectId::from_hex(value.as_bytes())?,
193− tag: id.ok_or_else(|| Error::InvariantViolation {
193+ tag: id.ok_or(Error::InvariantViolation {
194194 message: "got 'unborn' as tag target",
195195 })?,
196196 },
197197 "symref-target" => match value {
198198 "(null)" => Ref::Direct {
199199 full_ref_name: path.into(),
200− object: id.ok_or_else(|| Error::InvariantViolation {
200+ object: id.ok_or(Error::InvariantViolation {
201201 message: "got 'unborn' while (null) was a symref target",
202202 })?,
203203 },
@@ -222,7 +222,7 @@ pub(in crate::fetch::refs) fn parse_v2(line: &str) -> Result<Ref, Error> { · 18 unmodified lines
222222 }
223223 } else {
224224 Ref::Direct {
225− object: id.ok_or_else(|| Error::InvariantViolation {
225+ object: id.ok_or(Error::InvariantViolation {
226226 message: "got 'unborn' as object name of direct reference",
227227 })?,
228228 full_ref_name: path.into(),