History

thanks clippy

Sebastian Thiel committed 5 years ago

Commit 321908e1 parent 1dcc5903 files · +5 −5Browse files

Showing the changes to git-ref/src/store (2 of 3 files). Show all

Unified · Split

2 files
  1. git-ref/src/store/file/transaction.rs +2 −2
  2. git-ref/src/store/packed/decode.rs +1 −1
git-ref/src/store/file/transaction.rs+2−2
@@ -102,7 +102,7 @@ impl<'a> Transaction<'a> { · 101 unmodified lines
102102
103103 // Keep the previous value for the caller and ourselves. Maybe they want to keep a log of sorts.
104104 if let Some(existing) = existing_ref {
105− *previous = Some(existing.target.into());
105+ *previous = Some(existing.target);
106106 }
107107
108108 lock
@@ -165,7 +165,7 @@ impl<'a> Transaction<'a> { · 56 unmodified lines
165165 *previous = match existing_ref {
166166 None => Create::Only,
167167 Some(existing) => Create::OrUpdate {
168− previous: Some(existing.target.into()),
168+ previous: Some(existing.target),
169169 },
170170 };
171171
git-ref/src/store/packed/decode.rs+1−1
@@ -73,7 +73,7 @@ pub fn reference<'a, E: ParseError<&'a [u8]> + FromExternalError<&'a [u8], crate · 72 unmodified lines
7373 ) -> IResult<&'a [u8], packed::Reference<'a>, E> {
7474 let (input, (target, name)) = tuple((
7575 terminated(hex_hash, tag(b" ")),
76− map_res(until_newline, |name| crate::FullName::try_from(name)),
76+ map_res(until_newline, crate::FullName::try_from),
7777 ))(input)?;
7878 let (rest, object) = opt(delimited(tag(b"^"), hex_hash, newline))(input)?;
7979 Ok((rest, packed::Reference { name, target, object }))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t