History

thanks clippy

Sebastian Thiel committed 3 years ago

Commit bac57dd1 parent e22080e100 files · +172 −230Browse files

Showing the changes to git-protocol/src (3 of 100 files). Show all

Unified · Split

3 files
  1. git-protocol/src/command/tests.rs +2 −2
  2. git-protocol/src/fetch/arguments/mod.rs +2 −2
  3. git-protocol/src/fetch_fn.rs +1 −1
git-protocol/src/command/tests.rs+2−2
@@ -1,6 +1,6 @@
11 mod v1 {
22 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())
44 .expect("valid input capabilities")
55 .0
66 }
@@ -54,7 +54,7 @@ mod v2 { · 47 unmodified lines
5454 use git_transport::client::Capabilities;
5555
5656 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())
5858 .expect("valid input for V2 capabilities")
5959 }
6060
git-protocol/src/fetch/arguments/mod.rs+2−2
@@ -157,7 +157,7 @@ impl Arguments { · 156 unmodified lines
157157 }
158158 }
159159 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());
161161 }
162162 /// Create a new instance to help setting up arguments to send to the server as part of a `fetch` operation
163163 /// for which `features` are the available and configured features to use.
@@ -181,7 +181,7 @@ impl Arguments { · 17 unmodified lines
181181 let baked_features = features
182182 .iter()
183183 .map(|(n, v)| match v {
184− Some(v) => format!("{}={}", n, v),
184+ Some(v) => format!("{n}={v}"),
185185 None => n.to_string(),
186186 })
187187 .collect::<Vec<_>>();
git-protocol/src/fetch_fn.rs+1−1
@@ -123,7 +123,7 @@ where · 122 unmodified lines
123123 let mut round = 1;
124124 'negotiation: loop {
125125 progress.step();
126− progress.set_name(format!("negotiate (round {})", round));
126+ progress.set_name(format!("negotiate (round {round})"));
127127 round += 1;
128128 let action = delegate.negotiate(&refs, &mut arguments, previous_response.as_ref())?;
129129 let mut reader = arguments.send(&mut transport, action == Action::Cancel).await?;