Skip to content

Commit 4d4a9de

Browse files
committed
Address clippy lints on nightly
1 parent aa967aa commit 4d4a9de

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

cargo-registry-s3/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ impl Bucket {
9494

9595
fn auth(&self, verb: &str, date: &str, path: &str, md5: &str, content_type: &str) -> String {
9696
let string = format!(
97-
"{verb}\n{md5}\n{ty}\n{date}\n{headers}{resource}",
97+
"{verb}\n{md5}\n{ty}\n{date}\n{headers}/{name}/{path}",
9898
verb = verb,
9999
md5 = md5,
100100
ty = content_type,
101101
date = date,
102102
headers = "",
103-
resource = format!("/{}/{}", self.name, path)
103+
name = self.name,
104+
path = path
104105
);
105106
let signature = {
106107
let key = self.secret_key.as_bytes();

src/db.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ pub enum DieselPooledConn<'a> {
120120
Test(ReentrantMutexGuard<'a, PgConnection>),
121121
}
122122

123-
unsafe impl<'a> Send for DieselPooledConn<'a> {}
124-
125123
impl Deref for DieselPooledConn<'_> {
126124
type Target = PgConnection;
127125

src/util/io_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn read_fill<R: Read + ?Sized>(r: &mut R, mut slice: &mut [u8]) -> io::Resul
4444
if n == 0 {
4545
return Err(io::Error::new(io::ErrorKind::Other, "end of file reached"));
4646
}
47-
slice = &mut mem::replace(&mut slice, &mut [])[n..];
47+
slice = &mut mem::take(&mut slice)[n..];
4848
}
4949
Ok(())
5050
}

0 commit comments

Comments
 (0)