diff options
| author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-11-17 22:59:10 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-18 02:59:10 +0100 |
| commit | 238590aa9fdfe2aac04bb96abad2f2d2feb3101a (patch) | |
| tree | f8fa04e39baecb5460076c1329ca38ae31f440b6 /runtime | |
| parent | 483c10c94b8a5de49cee4c4b9a3ce74726501c8a (diff) | |
chore: use Rust 1.65.0 (#16688)
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/build.rs | 4 | ||||
| -rw-r--r-- | runtime/errors.rs | 2 | ||||
| -rw-r--r-- | runtime/fmt_errors.rs | 2 | ||||
| -rw-r--r-- | runtime/js.rs | 2 | ||||
| -rw-r--r-- | runtime/ops/fs.rs | 4 | ||||
| -rw-r--r-- | runtime/ops/worker_host.rs | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index 71301a36b..3feca3e76 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -36,7 +36,7 @@ mod not_docs { } let snapshot = js_runtime.snapshot(); - let snapshot_slice: &[u8] = &*snapshot; + let snapshot_slice: &[u8] = &snapshot; println!("Snapshot size: {}", snapshot_slice.len()); let compressed_snapshot_with_size = { @@ -63,7 +63,7 @@ mod not_docs { compressed_snapshot_with_size.len() ); - std::fs::write(&snapshot_path, compressed_snapshot_with_size).unwrap(); + std::fs::write(snapshot_path, compressed_snapshot_with_size).unwrap(); println!("Snapshot written to: {} ", snapshot_path.display()); } diff --git a/runtime/errors.rs b/runtime/errors.rs index 0f6df5828..442f9ee1b 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -165,7 +165,7 @@ pub fn get_error_class_name(e: &AnyError) -> Option<&'static str> { .or_else(|| e.downcast_ref::<hyper::Error>().map(get_hyper_error_class)) .or_else(|| { e.downcast_ref::<Arc<hyper::Error>>() - .map(|e| get_hyper_error_class(&**e)) + .map(|e| get_hyper_error_class(e)) }) .or_else(|| { e.downcast_ref::<deno_core::Canceled>().map(|e| { diff --git a/runtime/fmt_errors.rs b/runtime/fmt_errors.rs index e285d07b4..bd8cf4b94 100644 --- a/runtime/fmt_errors.rs +++ b/runtime/fmt_errors.rs @@ -195,7 +195,7 @@ fn find_recursive_cause(js_error: &JsError) -> Option<ErrorReference> { { return Some(ErrorReference { from: current_error, - to: *seen, + to: seen, }); } else { current_error = cause; diff --git a/runtime/js.rs b/runtime/js.rs index cdd479858..54a08d9b4 100644 --- a/runtime/js.rs +++ b/runtime/js.rs @@ -30,7 +30,7 @@ pub static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new( pub fn deno_isolate_init() -> Snapshot { debug!("Deno isolate init with snapshots."); - Snapshot::Static(&*CLI_SNAPSHOT) + Snapshot::Static(&CLI_SNAPSHOT) } #[cfg(test)] diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index a7e515d7b..e48e365be 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -271,7 +271,7 @@ async fn op_write_file_async( None => None, }; let (path, open_options) = open_helper( - &mut *state.borrow_mut(), + &mut state.borrow_mut(), &path, mode, Some(&write_open_options(create, append)), @@ -646,7 +646,7 @@ fn raw_chmod(path: &Path, _raw_mode: u32) -> Result<(), AnyError> { { use std::os::unix::fs::PermissionsExt; let permissions = PermissionsExt::from_mode(_raw_mode); - std::fs::set_permissions(&path, permissions).map_err(err_mapper)?; + std::fs::set_permissions(path, permissions).map_err(err_mapper)?; Ok(()) } // TODO Implement chmod for Windows (#4357) diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 2f07e48b2..72d466a94 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -184,7 +184,7 @@ fn op_create_worker( state.put::<WorkerId>(worker_id.next().unwrap()); let module_specifier = deno_core::resolve_url(&specifier)?; - let worker_name = args_name.unwrap_or_else(|| "".to_string()); + let worker_name = args_name.unwrap_or_default(); let (handle_sender, handle_receiver) = std::sync::mpsc::sync_channel::< Result<SendableWebWorkerHandle, AnyError>, |
