Merge pull request #447 from epage/update

chore: Upgrade dependencies
This commit is contained in:
Ed Page 2022-03-29 15:18:47 -05:00 committed by GitHub
commit a787633041
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 83 additions and 45 deletions

View file

@ -1 +1 @@
msrv = "1.54.0" # MSRV
msrv = "1.59.0" # MSRV

View file

@ -51,7 +51,7 @@ jobs:
- name: No-default features
run: cargo test --workspace --no-default-features
msrv:
name: "Check MSRV: 1.54.0"
name: "Check MSRV: 1.59.0"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@ -59,7 +59,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0 # MSRV
toolchain: 1.59.0 # MSRV
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
@ -113,7 +113,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0 # MSRV
toolchain: 1.59.0 # MSRV
profile: minimal
override: true
components: clippy

View file

@ -26,7 +26,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0 # MSRV
toolchain: 1.59.0 # MSRV
profile: minimal
override: true
components: rustfmt

View file

@ -59,9 +59,9 @@ jobs:
strategy:
matrix:
rust:
- 1.54.0 # MSRV
- 1.59.0 # MSRV
- stable
continue-on-error: ${{ matrix.rust != '1.54.0' }} # MSRV
continue-on-error: ${{ matrix.rust != '1.59.0' }} # MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout repository

100
Cargo.lock generated
View file

@ -255,9 +255,9 @@ dependencies = [
[[package]]
name = "concolor-clap"
version = "0.0.9"
version = "0.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0efdfa40e7f50b7ac8b2e336fad01c7071b9ab935b9082174cdb4e9fd5f6dc38"
checksum = "b35b55e880d42d4626e6a1aa5b4e63a4df61cf024472a31495ecbbb712402985"
dependencies = [
"clap 3.1.3",
"concolor",
@ -598,6 +598,18 @@ dependencies = [
"instant",
]
[[package]]
name = "filetime"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"winapi",
]
[[package]]
name = "fnv"
version = "1.0.7"
@ -791,6 +803,16 @@ dependencies = [
"serde",
]
[[package]]
name = "kstring"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747"
dependencies = [
"serde",
"static_assertions",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
@ -1294,12 +1316,50 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c970da16e7c682fa90a261cf0724dee241c9f7831635ecc4e988ae8f3b505559"
[[package]]
name = "similar"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e24979f63a11545f5f2c60141afe249d4f19f84581ea2138065e400941d83d3"
[[package]]
name = "siphasher"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e"
[[package]]
name = "snapbox"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1f212b806d6f56d19838e36a0aaa7e79a0bc9ca177e873fb87651ad92f983e2"
dependencies = [
"concolor",
"content_inspector",
"dunce",
"filetime",
"normalize-line-endings",
"os_pipe",
"similar",
"snapbox-macros",
"tempfile",
"wait-timeout",
"walkdir",
"yansi",
]
[[package]]
name = "snapbox-macros"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c01dea7e04cbb27ef4c86e9922184608185f7cd95c1763bc30d727cda4a5e930"
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "strsim"
version = "0.9.3"
@ -1415,19 +1475,6 @@ dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94217a6d6a89fb646cbc9f28283cf4745f77eb0b04c4f680c4b3ae4450e3a473"
dependencies = [
"combine",
"indexmap",
"itertools",
"kstring",
"serde",
]
[[package]]
name = "toml_edit"
version = "0.13.4"
@ -1437,33 +1484,24 @@ dependencies = [
"combine",
"indexmap",
"itertools",
"kstring",
"kstring 1.0.6",
"serde",
]
[[package]]
name = "trycmd"
version = "0.12.2"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "170d4db4fe81231f42ba55a50675f72590153d3c6ede8ae979bf3084bf2d8ae7"
checksum = "2c21f68a540a24b162ca101e3f7f4ce3c8458f594f28080018f29da23ad8567b"
dependencies = [
"concolor",
"content_inspector",
"difflib",
"dunce",
"glob",
"humantime",
"humantime-serde",
"normalize-line-endings",
"os_pipe",
"rayon",
"serde",
"shlex",
"tempfile",
"toml_edit 0.12.6",
"wait-timeout",
"walkdir",
"yansi",
"snapbox",
"toml_edit",
]
[[package]]
@ -1512,14 +1550,14 @@ dependencies = [
"human-panic",
"ignore",
"itertools",
"kstring",
"kstring 2.0.0",
"log",
"maplit",
"once_cell",
"proc-exit",
"serde",
"serde_json",
"toml_edit 0.13.4",
"toml_edit",
"trycmd",
"typed-arena",
"typos",

View file

@ -74,7 +74,7 @@ env_logger = { version = "0.9", default-features = false, features = ["termcolor
atty = "0.2.14"
yansi = "0.5.0"
concolor = { version = "0.0.8" }
concolor-clap = { version = "0.0.9", features = ["api_unstable"] }
concolor-clap = { version = "0.0.10", features = ["api_unstable"] }
bstr = "0.2"
once_cell = "1.2.0"
ahash = "0.7"
@ -88,13 +88,13 @@ derive_setters = "0.1"
itertools = "0.10"
serde_json = "1.0"
encoding = "0.2"
kstring = "1.0"
kstring = { version = "2.0.0", features = ["serde"] }
typed-arena = "2.0.1"
maplit = "1.0"
[dev-dependencies]
assert_fs = "1.0"
trycmd = "0.12.2"
trycmd = "0.13.3"
criterion = "0.3"
[profile.dev]

View file

@ -20,7 +20,7 @@ fn parse_dict(raw: &str) -> Words {
let mut current = &mut bad;
for line in raw.lines() {
let line = line.splitn(2, "//").next().unwrap().trim();
let line = line.split_once("//").map(|l| l.0).unwrap_or(line).trim();
if line.is_empty() || line.starts_with("package") {
continue;
} else if line.contains("DictMain") {

View file

@ -47,7 +47,7 @@ pub struct Variant {
impl Variant {
pub fn into_owned(self) -> crate::Variant {
crate::Variant {
types: self.types.iter().copied().collect(),
types: self.types.to_vec(),
word: self.word.to_owned(),
}
}

View file

@ -131,7 +131,7 @@ impl Report for PrintLong {
fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Error> {
let line = String::from_utf8_lossy(msg.buffer.as_ref());
let line = line.replace("\t", " ");
let line = line.replace('\t', " ");
let column = unicode_segmentation::UnicodeSegmentation::graphemes(
line.get(0..msg.byte_offset).unwrap(),
true,
@ -177,7 +177,7 @@ fn print_long_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Er
let mut handle = stdout.lock();
let line = String::from_utf8_lossy(msg.buffer.as_ref());
let line = line.replace("\t", " ");
let line = line.replace('\t', " ");
let start = String::from_utf8_lossy(&msg.buffer[0..msg.byte_offset]);
let column = unicode_segmentation::UnicodeSegmentation::graphemes(start.as_ref(), true).count();
match &msg.corrections {