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