History

thanks clippy

Sebastian Thiel committed 4 years ago

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

Showing the changes to git-protocol/src (1 of 1 file). Show all

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
190 "peeled" => Ref::Peeled {190 "peeled" => Ref::Peeled {
191 full_ref_name: path.into(),191 full_ref_name: path.into(),
192 object: git_hash::ObjectId::from_hex(value.as_bytes())?,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 message: "got 'unborn' as tag target",194 message: "got 'unborn' as tag target",
195 })?,195 })?,
196 },196 },
197 "symref-target" => match value {197 "symref-target" => match value {
198 "(null)" => Ref::Direct {198 "(null)" => Ref::Direct {
199 full_ref_name: path.into(),199 full_ref_name: path.into(),
200 object: id.ok_or_else(|| Error::InvariantViolation {200 object: id.ok_or(Error::InvariantViolation {
201 message: "got 'unborn' while (null) was a symref target",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 } else {223 } else {
224 Ref::Direct {224 Ref::Direct {
225 object: id.ok_or_else(|| Error::InvariantViolation {225 object: id.ok_or(Error::InvariantViolation {
226 message: "got 'unborn' as object name of direct reference",226 message: "got 'unborn' as object name of direct reference",
227 })?,227 })?,
228 full_ref_name: path.into(),228 full_ref_name: path.into(),