mirror of
https://github.com/crate-ci/typos.git
synced 2026-11-09 15:53:53 +01:00
refactor(report): Switch to swrde derive feature
This commit is contained in:
1 parent
3419a8df85
commit
a129fb3d65
4 files changed
+8
-10
No files matched your search
@@ -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