Skip to content

Commit 113cbcc

Browse files
committed
thanks clippy
1 parent 3cb216e commit 113cbcc

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

gix-attributes/src/state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl ValueRef<'_> {
3737

3838
impl<'a> From<&'a str> for ValueRef<'a> {
3939
fn from(v: &'a str) -> Self {
40-
ValueRef(v.as_bytes().into())
40+
ValueRef(v.as_bytes())
4141
}
4242
}
4343

gix-transport/src/client/git/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mod message {
6464
out.extend_from_slice(host.as_bytes());
6565
if let Some(port) = port {
6666
out.push_byte(b':');
67-
out.push_str(&format!("{port}"));
67+
out.push_str(format!("{port}"));
6868
}
6969
out.push(0);
7070
}

gix/src/repository/config/transport.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,7 @@ impl crate::Repository {
193193
remote_name
194194
.and_then(|name| {
195195
config
196-
.string_filter(
197-
&format!("remote.{}.{}", name, Remote::PROXY.name),
198-
&mut trusted_only,
199-
)
196+
.string_filter(format!("remote.{}.{}", name, Remote::PROXY.name), &mut trusted_only)
200197
.map(|v| (v, Cow::Owned(format!("remote.{name}.proxy").into()), &Remote::PROXY))
201198
})
202199
.or_else(|| {
@@ -254,7 +251,7 @@ impl crate::Repository {
254251
remote_name
255252
.and_then(|name| {
256253
config
257-
.string_filter(&format!("remote.{name}.proxyAuthMethod"), &mut trusted_only)
254+
.string_filter(format!("remote.{name}.proxyAuthMethod"), &mut trusted_only)
258255
.map(|v| {
259256
(
260257
v,

gix/src/repository/remote.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl crate::Repository {
137137
let mut config_url = |key: &'static config::tree::keys::Url, kind: &'static str| {
138138
self.config
139139
.resolved
140-
.string_filter(&format!("remote.{}.{}", name_or_url, key.name), &mut filter)
140+
.string_filter(format!("remote.{}.{}", name_or_url, key.name), &mut filter)
141141
.map(|url| {
142142
key.try_into_url(url).map_err(|err| find::Error::Url {
143143
kind,
@@ -151,7 +151,7 @@ impl crate::Repository {
151151
let config = &self.config.resolved;
152152

153153
let fetch_specs = config
154-
.strings_filter(&format!("remote.{}.{}", name_or_url, "fetch"), &mut filter)
154+
.strings_filter(format!("remote.{}.{}", name_or_url, "fetch"), &mut filter)
155155
.map(|specs| {
156156
config_spec(
157157
specs,
@@ -161,7 +161,7 @@ impl crate::Repository {
161161
)
162162
});
163163
let push_specs = config
164-
.strings_filter(&format!("remote.{}.{}", name_or_url, "push"), &mut filter)
164+
.strings_filter(format!("remote.{}.{}", name_or_url, "push"), &mut filter)
165165
.map(|specs| {
166166
config_spec(
167167
specs,
@@ -171,7 +171,7 @@ impl crate::Repository {
171171
)
172172
});
173173
let fetch_tags = config
174-
.string_filter(&format!("remote.{}.{}", name_or_url, "tagOpt"), &mut filter)
174+
.string_filter(format!("remote.{}.{}", name_or_url, "tagOpt"), &mut filter)
175175
.map(|value| {
176176
config::tree::Remote::TAG_OPT
177177
.try_into_tag_opt(value)

0 commit comments

Comments
 (0)