Showing the changes to git-protocol (6 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?; |
| @@ -214,7 +214,7 @@ mod v2 { · 213 unmodified lines | |||
| 214 | fetch::response::Error::UploadPack(err) => { | 214 | fetch::response::Error::UploadPack(err) => { |
| 215 | assert_eq!(err.message, "segmentation fault\n") | 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 | "agent", | 28 | "agent", |
| 29 | ) | 29 | ) |
| 30 | .await?; | 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 | Ok(()) | 33 | Ok(()) |
| 34 | } | 34 | } |
| @@ -140,7 +140,7 @@ async fn ls_remote_abort_in_prep_ls_refs() -> crate::Result { · 139 unmodified lines | |||
| 140 | assert_eq!(err.kind(), std::io::ErrorKind::Other); | 140 | assert_eq!(err.kind(), std::io::ErrorKind::Other); |
| 141 | assert_eq!(err.get_ref().expect("other error").to_string(), "hello world"); | 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 | Ok(()) | 145 | Ok(()) |
| 146 | } | 146 | } |