mirror of
https://github.com/crate-ci/typos.git
synced 2026-10-17 01:25:12 +02:00
refactor(report): Switch to swrde derive feature
This commit is contained in:
Generated
+3
-1
@@ -651,6 +651,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
name = "serde"
|
||||
version = "1.0.85"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
@@ -807,7 +810,6 @@ dependencies = [
|
||||
"phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ ignore = "0.4"
|
||||
phf = { version = "0.7", features = ["unicase"] }
|
||||
regex = "1.0"
|
||||
lazy_static = "1.2.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
itertools = "0.8"
|
||||
unicase = "1.1"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
mod dict;
|
||||
mod dict_codegen;
|
||||
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
use std::borrow::Cow;
|
||||
use std::io::{self, Write};
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[serde(tag = "type")]
|
||||
pub enum Message<'m> {
|
||||
@@ -28,14 +28,14 @@ impl<'m> From<FilenameCorrection<'m>> for Message<'m> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct BinaryFile<'m> {
|
||||
pub path: &'m std::path::Path,
|
||||
#[serde(skip)]
|
||||
pub(crate) non_exhaustive: (),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct Correction<'m> {
|
||||
pub path: &'m std::path::Path,
|
||||
#[serde(skip)]
|
||||
@@ -48,7 +48,7 @@ pub struct Correction<'m> {
|
||||
pub(crate) non_exhaustive: (),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct FilenameCorrection<'m> {
|
||||
pub path: &'m std::path::Path,
|
||||
pub typo: &'m str,
|
||||
|
||||
Reference in New Issue
Block a user