Merge pull request #945 from hvithrafn/update-dependencies

Update dependencies; fix breakage
This commit is contained in:
Max Brunsfeld 2021-03-01 09:15:38 -08:00 committed by GitHub
commit 3f315f167b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 331 additions and 490 deletions

797
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -19,23 +19,23 @@ name = "benchmark"
harness = false
[dependencies]
ansi_term = "0.11"
ansi_term = "0.12"
atty = "0.2"
cc = "^1.0.58"
clap = "2.32"
difference = "2.0"
dirs = "2.0.2"
dirs = "3.0"
glob = "0.3.0"
html-escape = "0.2.6"
lazy_static = "1.2.0"
libloading = "0.5"
once_cell = "0.1.8"
libloading = "0.7"
once_cell = "1.7"
regex = "1"
regex-syntax = "0.6.4"
serde = "1.0"
serde_derive = "1.0"
smallbitvec = "2.3.0"
tiny_http = "0.6"
tiny_http = "0.8"
walkdir = "2.3"
webbrowser = "0.5.1"
@ -65,5 +65,5 @@ version = "0.4.6"
features = ["std"]
[dev-dependencies]
rand = "0.7.0"
rand = "0.8"
tempfile = "3"

View file

@ -105,6 +105,12 @@ impl From<glob::GlobError> for Error {
}
}
impl From<libloading::Error> for Error {
fn from(error: libloading::Error) -> Self {
Error::new(error.to_string())
}
}
impl From<regex_syntax::ast::Error> for Error {
fn from(error: regex_syntax::ast::Error) -> Self {
Error::new(error.to_string())

View file

@ -346,7 +346,7 @@ impl Loader {
}
}
let library = Library::new(&library_path).map_err(Error::wrap(|| {
let library = unsafe { Library::new(&library_path) }.map_err(Error::wrap(|| {
format!("Error opening dynamic library {:?}", &library_path)
}))?;
let language_fn_name = format!("tree_sitter_{}", replace_dashes_with_underscores(name));

View file

@ -13,7 +13,7 @@ impl Rand {
}
pub fn unsigned(&mut self, max: usize) -> usize {
self.0.gen_range(0, max + 1)
self.0.gen_range(0 .. max + 1)
}
pub fn words(&mut self, max_count: usize) -> Vec<u8> {

View file

@ -24,7 +24,7 @@ include = [
[dependencies]
lazy_static = { version="1.2.0", optional=true }
regex = "1"
spin = { version="0.5", optional=true }
spin = { version="0.7", optional=true }
[build-dependencies]
cc = "^1.0.58"