diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-01-15 01:10:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-15 07:10:12 +0100 |
commit | ad224f53c798e8417a63d98daeaf3cadc199666c (patch) | |
tree | f323be53d4f5b4289cd04296af1d35028dc23b15 /runtime | |
parent | 903cb48fe94bbbb0c43f17cf51e84a5583ddb728 (diff) |
chore: upgrade to rust 1.58 (#13377)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/inspector_server.rs | 8 | ||||
-rw-r--r-- | runtime/js.rs | 1 | ||||
-rw-r--r-- | runtime/permissions.rs | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/runtime/inspector_server.rs b/runtime/inspector_server.rs index 899e128c7..dde5cea02 100644 --- a/runtime/inspector_server.rs +++ b/runtime/inspector_server.rs @@ -152,11 +152,7 @@ fn handle_ws_request( _ => http::Response::builder() .status(http::StatusCode::BAD_REQUEST) .body("Not a valid Websocket Request".into()), - }); - - if resp.is_err() { - return resp; - } + })?; let (parts, _) = req.into_parts(); let req = http::Request::from_parts(parts, body); @@ -193,7 +189,7 @@ fn handle_ws_request( pump_websocket_messages(websocket, inbound_tx, outbound_rx).await; }); - resp + Ok(resp) } fn handle_json_request( diff --git a/runtime/js.rs b/runtime/js.rs index c259ff5ee..cdd479858 100644 --- a/runtime/js.rs +++ b/runtime/js.rs @@ -4,6 +4,7 @@ use log::debug; use once_cell::sync::Lazy; pub static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new( + #[allow(clippy::uninit_vec)] #[cold] #[inline(never)] || { diff --git a/runtime/permissions.rs b/runtime/permissions.rs index d4e1ec4f6..c404436d6 100644 --- a/runtime/permissions.rs +++ b/runtime/permissions.rs @@ -1918,7 +1918,7 @@ fn permission_prompt(message: &str) -> bool { if success != TRUE { panic!( "Error flushing console input buffer: {}", - std::io::Error::last_os_error().to_string() + std::io::Error::last_os_error() ) } } @@ -1941,7 +1941,7 @@ fn permission_prompt(message: &str) -> bool { if success != TRUE { panic!( "Error emulating enter key press: {}", - std::io::Error::last_os_error().to_string() + std::io::Error::last_os_error() ) } } @@ -1954,7 +1954,7 @@ fn permission_prompt(message: &str) -> bool { if success != TRUE { panic!( "Error peeking console input buffer: {}", - std::io::Error::last_os_error().to_string() + std::io::Error::last_os_error() ) } events_read == 0 |