Skip to content

Commit

Permalink
clippy: fix minor issue
Browse files Browse the repository at this point in the history
error: the borrowed expression implements the required traits
   --> enclave_build/src/docker.rs:101:50
    |
101 |                     let decoded = base64::decode(&auth).map_err(|err| {
    |                                                  ^^^^^ help: change this to: `auth`
    |
    = note: `-D clippy::needless-borrow` implied by `-D warnings`

Signed-off-by: Alexandru Ciobotaru <[email protected]>
  • Loading branch information
alcioa committed Dec 22, 2022
1 parent be4351a commit 19c9be3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enclave_build/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl DockerUtil {
.to_string();

let auth = auth.replace('"', "");
let decoded = base64::decode(&auth).map_err(|err| {
let decoded = base64::decode(auth).map_err(|err| {
CredentialsError(format!("Invalid Base64 encoding for auth: {}", err))
})?;
let decoded = std::str::from_utf8(&decoded).map_err(|err| {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ fn vsock_set_connect_timeout(fd: RawFd, millis: i64) -> NitroCliResult<()> {
let timeval = TimeVal::milliseconds(millis);
let ret = unsafe {
libc::setsockopt(
fd as i32,
fd,
libc::AF_VSOCK,
SO_VM_SOCKETS_CONNECT_TIMEOUT,
&timeval as *const _ as *const c_void,
Expand Down

0 comments on commit 19c9be3

Please sign in to comment.