Showing the changes to git-protocol/src (3 of 100 files). Show all
Unified · Split
| @@ -1,6 +1,6 @@ | |||
| 1 | mod v1 { | 1 | mod v1 { |
| 2 | fn capabilities(input: &str) -> git_transport::client::Capabilities { | 2 | fn capabilities(input: &str) -> git_transport::client::Capabilities { |
| 3 | git_transport::client::Capabilities::from_bytes(format!("\0{}", input).as_bytes()) | 3 | git_transport::client::Capabilities::from_bytes(format!("\0{input}").as_bytes()) |
| 4 | .expect("valid input capabilities") | 4 | .expect("valid input capabilities") |
| 5 | .0 | 5 | .0 |
| 6 | } | 6 | } |
| @@ -54,7 +54,7 @@ mod v2 { · 47 unmodified lines | |||
| 54 | use git_transport::client::Capabilities; | 54 | use git_transport::client::Capabilities; |
| 55 | 55 | ||
| 56 | fn capabilities(command: &str, input: &str) -> Capabilities { | 56 | fn capabilities(command: &str, input: &str) -> Capabilities { |
| 57 | Capabilities::from_lines(format!("version 2\n{}={}", command, input).into()) | 57 | Capabilities::from_lines(format!("version 2\n{command}={input}").into()) |
| 58 | .expect("valid input for V2 capabilities") | 58 | .expect("valid input for V2 capabilities") |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -157,7 +157,7 @@ impl Arguments { · 156 unmodified lines | |||
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 159 | fn prefixed(&mut self, prefix: &str, value: impl fmt::Display) { | 159 | fn prefixed(&mut self, prefix: &str, value: impl fmt::Display) { |
| 160 | self.args.push(format!("{}{}", prefix, value).into()); | 160 | self.args.push(format!("{prefix}{value}").into()); |
| 161 | } | 161 | } |
| 162 | /// Create a new instance to help setting up arguments to send to the server as part of a `fetch` operation | 162 | /// Create a new instance to help setting up arguments to send to the server as part of a `fetch` operation |
| 163 | /// for which `features` are the available and configured features to use. | 163 | /// for which `features` are the available and configured features to use. |
| @@ -181,7 +181,7 @@ impl Arguments { · 17 unmodified lines | |||
| 181 | let baked_features = features | 181 | let baked_features = features |
| 182 | .iter() | 182 | .iter() |
| 183 | .map(|(n, v)| match v { | 183 | .map(|(n, v)| match v { |
| 184 | Some(v) => format!("{}={}", n, v), | 184 | Some(v) => format!("{n}={v}"), |
| 185 | None => n.to_string(), | 185 | None => n.to_string(), |
| 186 | }) | 186 | }) |
| 187 | .collect::<Vec<_>>(); | 187 | .collect::<Vec<_>>(); |
| @@ -123,7 +123,7 @@ where · 122 unmodified lines | |||
| 123 | let mut round = 1; | 123 | let mut round = 1; |
| 124 | 'negotiation: loop { | 124 | 'negotiation: loop { |
| 125 | progress.step(); | 125 | progress.step(); |
| 126 | progress.set_name(format!("negotiate (round {})", round)); | 126 | progress.set_name(format!("negotiate (round {round})")); |
| 127 | round += 1; | 127 | round += 1; |
| 128 | let action = delegate.negotiate(&refs, &mut arguments, previous_response.as_ref())?; | 128 | let action = delegate.negotiate(&refs, &mut arguments, previous_response.as_ref())?; |
| 129 | let mut reader = arguments.send(&mut transport, action == Action::Cancel).await?; | 129 | let mut reader = arguments.send(&mut transport, action == Action::Cancel).await?; |