diff --git a/cargo-registry-s3/lib.rs b/cargo-registry-s3/lib.rs index 19dea8d66bc..679e0861936 100644 --- a/cargo-registry-s3/lib.rs +++ b/cargo-registry-s3/lib.rs @@ -94,13 +94,14 @@ impl Bucket { fn auth(&self, verb: &str, date: &str, path: &str, md5: &str, content_type: &str) -> String { let string = format!( - "{verb}\n{md5}\n{ty}\n{date}\n{headers}{resource}", + "{verb}\n{md5}\n{ty}\n{date}\n{headers}/{name}/{path}", verb = verb, md5 = md5, ty = content_type, date = date, headers = "", - resource = format!("/{}/{}", self.name, path) + name = self.name, + path = path ); let signature = { let key = self.secret_key.as_bytes(); diff --git a/src/db.rs b/src/db.rs index dabb6d9e1c6..68f9c049b72 100644 --- a/src/db.rs +++ b/src/db.rs @@ -120,8 +120,6 @@ pub enum DieselPooledConn<'a> { Test(ReentrantMutexGuard<'a, PgConnection>), } -unsafe impl<'a> Send for DieselPooledConn<'a> {} - impl Deref for DieselPooledConn<'_> { type Target = PgConnection; diff --git a/src/util/io_util.rs b/src/util/io_util.rs index 04d82a64855..be415ac86b4 100644 --- a/src/util/io_util.rs +++ b/src/util/io_util.rs @@ -44,7 +44,7 @@ pub fn read_fill(r: &mut R, mut slice: &mut [u8]) -> io::Resul if n == 0 { return Err(io::Error::new(io::ErrorKind::Other, "end of file reached")); } - slice = &mut mem::replace(&mut slice, &mut [])[n..]; + slice = &mut mem::take(&mut slice)[n..]; } Ok(()) }