Unified · Split
| @@ -190,14 +190,14 @@ pub(in crate::fetch::refs) fn parse_v2(line: &str) -> Result<Ref, Error> { · 189 unmodified lines | ||
| 190 | 190 | "peeled" => Ref::Peeled { |
| 191 | 191 | full_ref_name: path.into(), |
| 192 | 192 | object: git_hash::ObjectId::from_hex(value.as_bytes())?, |
| 193 | − tag: id.ok_or_else(|| Error::InvariantViolation { | |
| 193 | + tag: id.ok_or(Error::InvariantViolation { | |
| 194 | 194 | message: "got 'unborn' as tag target", |
| 195 | 195 | })?, |
| 196 | 196 | }, |
| 197 | 197 | "symref-target" => match value { |
| 198 | 198 | "(null)" => Ref::Direct { |
| 199 | 199 | full_ref_name: path.into(), |
| 200 | − object: id.ok_or_else(|| Error::InvariantViolation { | |
| 200 | + object: id.ok_or(Error::InvariantViolation { | |
| 201 | 201 | message: "got 'unborn' while (null) was a symref target", |
| 202 | 202 | })?, |
| 203 | 203 | }, |
| @@ -222,7 +222,7 @@ pub(in crate::fetch::refs) fn parse_v2(line: &str) -> Result<Ref, Error> { · 18 unmodified lines | ||
| 222 | 222 | } |
| 223 | 223 | } else { |
| 224 | 224 | Ref::Direct { |
| 225 | − object: id.ok_or_else(|| Error::InvariantViolation { | |
| 225 | + object: id.ok_or(Error::InvariantViolation { | |
| 226 | 226 | message: "got 'unborn' as object name of direct reference", |
| 227 | 227 | })?, |
| 228 | 228 | full_ref_name: path.into(), |