mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: update to Rust edition 2021 (#12578)
This commit is contained in:
parent
70336912b4
commit
8e31bbbe55
40 changed files with 23 additions and 46 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||||
max_width = 80
|
max_width = 80
|
||||||
tab_spaces = 2
|
tab_spaces = 2
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
name = "deno_bench_util"
|
name = "deno_bench_util"
|
||||||
version = "0.17.0"
|
version = "0.17.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
publish = true
|
publish = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -5,7 +5,7 @@ name = "deno"
|
||||||
version = "1.15.3"
|
version = "1.15.3"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
default-run = "deno"
|
default-run = "deno"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
description = "Provides the deno executable"
|
description = "Provides the deno executable"
|
||||||
|
|
|
@ -29,7 +29,6 @@ use deno_runtime::worker::WorkerOptions;
|
||||||
use deno_runtime::BootstrapOptions;
|
use deno_runtime::BootstrapOptions;
|
||||||
use deno_tls::create_default_root_cert_store;
|
use deno_tls::create_default_root_cert_store;
|
||||||
use log::Level;
|
use log::Level;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::env::current_exe;
|
use std::env::current_exe;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
name = "deno_core"
|
name = "deno_core"
|
||||||
version = "0.105.0"
|
version = "0.105.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -17,8 +17,6 @@ use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use serde_v8::to_v8;
|
use serde_v8::to_v8;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::option::Option;
|
use std::option::Option;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use v8::HandleScope;
|
use v8::HandleScope;
|
||||||
|
|
|
@ -4,8 +4,6 @@ pub use anyhow::anyhow;
|
||||||
pub use anyhow::bail;
|
pub use anyhow::bail;
|
||||||
pub use anyhow::Context;
|
pub use anyhow::Context;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
|
@ -10,7 +10,6 @@ use deno_core::Resource;
|
||||||
use deno_core::ResourceId;
|
use deno_core::ResourceId;
|
||||||
use deno_core::ZeroCopyBuf;
|
use deno_core::ZeroCopyBuf;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::io::Error;
|
use std::io::Error;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
|
|
@ -16,7 +16,6 @@ use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
|
@ -29,7 +29,6 @@ use futures::task::AtomicWaker;
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::ffi::c_void;
|
use std::ffi::c_void;
|
||||||
use std::mem::forget;
|
use std::mem::forget;
|
||||||
use std::option::Option;
|
use std::option::Option;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_broadcast_channel"
|
name = "deno_broadcast_channel"
|
||||||
version = "0.17.0"
|
version = "0.17.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_console"
|
name = "deno_console"
|
||||||
version = "0.23.0"
|
version = "0.23.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_crypto"
|
name = "deno_crypto"
|
||||||
version = "0.37.0"
|
version = "0.37.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -14,8 +14,6 @@ use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::num::NonZeroU32;
|
use std::num::NonZeroU32;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_fetch"
|
name = "deno_fetch"
|
||||||
version = "0.46.0"
|
version = "0.46.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_ffi"
|
name = "deno_ffi"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -18,7 +18,6 @@ use serde::Deserialize;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::ffi::c_void;
|
use std::ffi::c_void;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_http"
|
name = "deno_http"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_net"
|
name = "deno_net"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_timers"
|
name = "deno_timers"
|
||||||
version = "0.21.0"
|
version = "0.21.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_tls"
|
name = "deno_tls"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_url"
|
name = "deno_url"
|
||||||
version = "0.23.0"
|
version = "0.23.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_web"
|
name = "deno_web"
|
||||||
version = "0.54.0"
|
version = "0.54.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_webgpu"
|
name = "deno_webgpu"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -5,7 +5,6 @@ use deno_core::ResourceId;
|
||||||
use deno_core::{OpState, Resource};
|
use deno_core::{OpState, Resource};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
|
|
||||||
use crate::texture::{GpuTextureFormat, GpuTextureViewDimension};
|
use crate::texture::{GpuTextureFormat, GpuTextureViewDimension};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ use deno_core::{OpState, Resource};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
use crate::pipeline::GpuIndexFormat;
|
use crate::pipeline::GpuIndexFormat;
|
||||||
|
|
|
@ -6,7 +6,6 @@ use deno_core::{OpState, Resource};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
|
|
||||||
use crate::sampler::GpuCompareFunction;
|
use crate::sampler::GpuCompareFunction;
|
||||||
use crate::texture::GpuTextureFormat;
|
use crate::texture::GpuTextureFormat;
|
||||||
|
|
|
@ -6,8 +6,6 @@ use deno_core::ResourceId;
|
||||||
use deno_core::{OpState, Resource};
|
use deno_core::{OpState, Resource};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
use super::error::WebGpuResult;
|
use super::error::WebGpuResult;
|
||||||
pub(crate) struct WebGpuTexture(pub(crate) wgpu_core::id::TextureId);
|
pub(crate) struct WebGpuTexture(pub(crate) wgpu_core::id::TextureId);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_webidl"
|
name = "deno_webidl"
|
||||||
version = "0.23.0"
|
version = "0.23.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_websocket"
|
name = "deno_websocket"
|
||||||
version = "0.28.0"
|
version = "0.28.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_webstorage"
|
name = "deno_webstorage"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "deno_runtime"
|
name = "deno_runtime"
|
||||||
version = "0.31.0"
|
version = "0.31.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
description = "Provides the deno runtime library"
|
description = "Provides the deno runtime library"
|
||||||
|
|
|
@ -261,7 +261,6 @@ pub fn kill(pid: i32, signal: &str) -> Result<(), AnyError> {
|
||||||
let signo = super::signal::signal_str_to_int(signal)?;
|
let signo = super::signal::signal_str_to_int(signal)?;
|
||||||
use nix::sys::signal::{kill as unix_kill, Signal};
|
use nix::sys::signal::{kill as unix_kill, Signal};
|
||||||
use nix::unistd::Pid;
|
use nix::unistd::Pid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
let sig = Signal::try_from(signo)?;
|
let sig = Signal::try_from(signo)?;
|
||||||
unix_kill(Pid::from_raw(pid), Option::Some(sig)).map_err(AnyError::from)
|
unix_kill(Pid::from_raw(pid), Option::Some(sig)).map_err(AnyError::from)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
name = "serde_v8"
|
name = "serde_v8"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||||
use bencher::{benchmark_group, benchmark_main, Bencher};
|
use bencher::{benchmark_group, benchmark_main, Bencher};
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use serde_v8::utils::{js_exec, v8_do};
|
use serde_v8::utils::{js_exec, v8_do};
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
use serde::de::{self, Visitor};
|
use serde::de::{self, Visitor};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::keys::{v8_struct_key, KeyCache};
|
use crate::keys::{v8_struct_key, KeyCache};
|
||||||
use crate::payload::ValueType;
|
use crate::payload::ValueType;
|
||||||
|
|
|
@ -3,7 +3,6 @@ use serde::ser;
|
||||||
use serde::ser::Serialize;
|
use serde::ser::Serialize;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::keys::v8_struct_key;
|
use crate::keys::v8_struct_key;
|
||||||
|
|
|
@ -3,7 +3,6 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use serde_v8::utils::{js_exec, v8_do};
|
use serde_v8::utils::{js_exec, v8_do};
|
||||||
use serde_v8::Result;
|
use serde_v8::Result;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct MagicOp<'s> {
|
struct MagicOp<'s> {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "test_ffi"
|
name = "test_ffi"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["the deno authors"]
|
authors = ["the deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name = "test_util"
|
name = "test_util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["the Deno authors"]
|
authors = ["the Deno authors"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
Loading…
Reference in a new issue