Showing the changes to git-protocol (6 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?; |
| @@ -214,7 +214,7 @@ mod v2 { · 213 unmodified lines | ||
| 214 | 214 | fetch::response::Error::UploadPack(err) => { |
| 215 | 215 | assert_eq!(err.message, "segmentation fault\n") |
| 216 | 216 | } |
| 217 | − err => panic!("we expect upload pack errors, got {:#?}", err), | |
| 217 | + err => panic!("we expect upload pack errors, got {err:#?}"), | |
| 218 | 218 | }, |
| 219 | 219 | } |
| 220 | 220 | } |
| @@ -28,7 +28,7 @@ async fn clone() -> crate::Result { · 27 unmodified lines | ||
| 28 | 28 | "agent", |
| 29 | 29 | ) |
| 30 | 30 | .await?; |
| 31 | − assert_eq!(dlg.pack_bytes, 876, "{}: It be able to read pack bytes", fixture); | |
| 31 | + assert_eq!(dlg.pack_bytes, 876, "{fixture}: It be able to read pack bytes"); | |
| 32 | 32 | } |
| 33 | 33 | Ok(()) |
| 34 | 34 | } |
| @@ -140,7 +140,7 @@ async fn ls_remote_abort_in_prep_ls_refs() -> crate::Result { · 139 unmodified lines | ||
| 140 | 140 | assert_eq!(err.kind(), std::io::ErrorKind::Other); |
| 141 | 141 | assert_eq!(err.get_ref().expect("other error").to_string(), "hello world"); |
| 142 | 142 | } |
| 143 | − err => panic!("should not have another error here, got: {}", err), | |
| 143 | + err => panic!("should not have another error here, got: {err}"), | |
| 144 | 144 | } |
| 145 | 145 | Ok(()) |
| 146 | 146 | } |