diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 662808af93..f57513d3e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - name: Install rust uses: hecrj/setup-rust-action@v1 with: - rust-version: 1.48.0 + rust-version: 1.49.0 - name: Install clippy and rustfmt if: matrix.kind == 'lint' diff --git a/cli/module_graph.rs b/cli/module_graph.rs index d1e51bd4ca..e86732b24c 100644 --- a/cli/module_graph.rs +++ b/cli/module_graph.rs @@ -2300,10 +2300,11 @@ pub mod tests { .expect("should have checked"); assert!(result_info.maybe_ignored_options.is_none()); assert!(result_info.diagnostics.is_empty()); - let h = handler.lock().unwrap(); - assert_eq!(h.version_calls.len(), 2); - let ver0 = h.version_calls[0].1.clone(); - let ver1 = h.version_calls[1].1.clone(); + let (ver0, ver1) = { + let h = handler.lock().unwrap(); + assert_eq!(h.version_calls.len(), 2); + (h.version_calls[0].1.clone(), h.version_calls[1].1.clone()) + }; // let's do it all over again to ensure that the versions are determinstic let (graph, handler) = setup(specifier).await; diff --git a/cli/standalone.rs b/cli/standalone.rs index fea42fc969..af38fd4ebb 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -107,10 +107,12 @@ impl ModuleLoader for EmbeddedModuleLoader { } async fn run(source_code: String, args: Vec) -> Result<(), AnyError> { - let mut flags = Flags::default(); - flags.argv = args[1..].to_vec(); - // TODO(lucacasonato): remove once you can specify this correctly through embedded metadata - flags.unstable = true; + let flags = Flags { + argv: args[1..].to_vec(), + // TODO(lucacasonato): remove once you can specify this correctly through embedded metadata + unstable: true, + ..Default::default() + }; let main_module = ModuleSpecifier::resolve_url(SPECIFIER)?; let permissions = Permissions::allow_all(); let module_loader = Rc::new(EmbeddedModuleLoader(source_code)); diff --git a/core/async_cancel.rs b/core/async_cancel.rs index 90cb0c41ff..51ed4c6476 100644 --- a/core/async_cancel.rs +++ b/core/async_cancel.rs @@ -334,7 +334,7 @@ mod internal { impl PartialEq for Node { fn eq(&self, other: &Self) -> bool { - self as *const _ == other as *const _ + std::ptr::eq(self, other) } } diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index d6d7d7e787..d088880f74 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -1660,15 +1660,14 @@ async fn op_utime_async( args: Value, _zero_copy: BufVec, ) -> Result { - let state = state.borrow(); - super::check_unstable(&state, "Deno.utime"); + super::check_unstable(&state.borrow(), "Deno.utime"); let args: UtimeArgs = serde_json::from_value(args)?; let path = PathBuf::from(&args.path); let atime = filetime::FileTime::from_unix_time(args.atime.0, args.atime.1); let mtime = filetime::FileTime::from_unix_time(args.mtime.0, args.mtime.1); - state.borrow::().check_write(&path)?; + state.borrow().borrow::().check_write(&path)?; tokio::task::spawn_blocking(move || { filetime::set_file_times(path, atime, mtime)?;