Skip to content

Commit ae2b733

Browse files
committed
thanks clippy
1 parent 91d29c3 commit ae2b733

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.70.0"
1+
msrv = "1.74.0"

gix-credentials/src/helper/invoke.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ impl Action {
99
Action::Get(ctx) => ctx.write_to(write),
1010
Action::Store(last) | Action::Erase(last) => {
1111
write.write_all(last).ok();
12-
write.write_all(&[b'\n']).ok();
12+
write.write_all(b"\n").ok();
1313
Ok(())
1414
}
1515
}

gix-object/src/tree/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl crate::WriteTo for Tree {
4747
.into());
4848
}
4949
out.write_all(filename)?;
50-
out.write_all(&[b'\0'])?;
50+
out.write_all(b"\0")?;
5151

5252
out.write_all(oid.as_bytes())?;
5353
}
@@ -94,7 +94,7 @@ impl<'a> crate::WriteTo for TreeRef<'a> {
9494
.into());
9595
}
9696
out.write_all(filename)?;
97-
out.write_all(&[b'\0'])?;
97+
out.write_all(b"\0")?;
9898

9999
out.write_all(oid.as_bytes())?;
100100
}

gix-packetline-blocking/src/encode/blocking_io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn data_to_write(data: &[u8], out: impl io::Write) -> io::Result<usize> {
3737

3838
/// Write a `text` message to `out`, which is assured to end in a newline.
3939
pub fn text_to_write(text: &[u8], out: impl io::Write) -> io::Result<usize> {
40-
prefixed_and_suffixed_data_to_write(&[], text, &[b'\n'], out)
40+
prefixed_and_suffixed_data_to_write(&[], text, b"\n", out)
4141
}
4242

4343
fn prefixed_data_to_write(prefix: &[u8], data: &[u8], out: impl io::Write) -> io::Result<usize> {

gix-packetline/src/encode/blocking_io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn data_to_write(data: &[u8], out: impl io::Write) -> io::Result<usize> {
3535

3636
/// Write a `text` message to `out`, which is assured to end in a newline.
3737
pub fn text_to_write(text: &[u8], out: impl io::Write) -> io::Result<usize> {
38-
prefixed_and_suffixed_data_to_write(&[], text, &[b'\n'], out)
38+
prefixed_and_suffixed_data_to_write(&[], text, b"\n", out)
3939
}
4040

4141
fn prefixed_data_to_write(prefix: &[u8], data: &[u8], out: impl io::Write) -> io::Result<usize> {

gix-refspec/src/write.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ impl Instruction<'_> {
3636
allow_non_fast_forward,
3737
}) => {
3838
if *allow_non_fast_forward {
39-
out.write_all(&[b'+'])?;
39+
out.write_all(b"+")?;
4040
}
4141
out.write_all(src)?;
42-
out.write_all(&[b':'])?;
42+
out.write_all(b":")?;
4343
out.write_all(dst)
4444
}
4545
Instruction::Push(Push::AllMatchingBranches { allow_non_fast_forward }) => {
4646
if *allow_non_fast_forward {
47-
out.write_all(&[b'+'])?;
47+
out.write_all(b"+")?;
4848
}
49-
out.write_all(&[b':'])
49+
out.write_all(b":")
5050
}
5151
Instruction::Push(Push::Delete { ref_or_pattern }) => {
52-
out.write_all(&[b':'])?;
52+
out.write_all(b":")?;
5353
out.write_all(ref_or_pattern)
5454
}
5555
Instruction::Fetch(Fetch::Only { src }) => out.write_all(src),
5656
Instruction::Fetch(Fetch::Exclude { src }) => {
57-
out.write_all(&[b'^'])?;
57+
out.write_all(b"^")?;
5858
out.write_all(src)
5959
}
6060
Instruction::Fetch(Fetch::AndUpdate {
@@ -63,10 +63,10 @@ impl Instruction<'_> {
6363
allow_non_fast_forward,
6464
}) => {
6565
if *allow_non_fast_forward {
66-
out.write_all(&[b'+'])?;
66+
out.write_all(b"+")?;
6767
}
6868
out.write_all(src)?;
69-
out.write_all(&[b':'])?;
69+
out.write_all(b":")?;
7070
out.write_all(dst)
7171
}
7272
}

gix-url/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ impl Url {
322322
(Some(user), Some(host)) => {
323323
out.write_all(user.as_bytes())?;
324324
if let Some(password) = &self.password {
325-
out.write_all(&[b':'])?;
325+
out.write_all(b":")?;
326326
out.write_all(password.as_bytes())?;
327327
}
328-
out.write_all(&[b'@'])?;
328+
out.write_all(b"@")?;
329329
out.write_all(host.as_bytes())?;
330330
}
331331
(None, Some(host)) => {

0 commit comments

Comments
 (0)