Skip to content

Commit 2fb4310

Browse files
committed
fix serde support (#366)
1 parent 9449bc7 commit 2fb4310

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

git-attributes/src/ignore.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pub mod pattern {
22
use bitflags::bitflags;
33

44
bitflags! {
5+
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
56
pub struct Mode: u32 {
67
/// The pattern does not contain a sub-directory and - it doesn't contain slashes after removing the trailing one.
78
const NO_SUB_DIR = 1 << 0;

git-attributes/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#![forbid(unsafe_code, rust_2018_idioms)]
1+
#![forbid(unsafe_code)]
2+
#![deny(rust_2018_idioms)]
23

34
use bstr::BStr;
45

@@ -11,6 +12,7 @@ pub enum State<'a> {
1112
Unset,
1213
/// The attribute is set to the given value, which followed the `=` sign.
1314
/// Note that values can be empty.
15+
#[cfg_attr(feature = "serde1", serde(borrow))]
1416
Value(&'a BStr),
1517
/// The attribute isn't mentioned with a given path or is explicitly set to `Unspecified` using the `!` sign.
1618
Unspecified,

git-mailmap/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#![forbid(unsafe_code, rust_2018_idioms)]
1+
#![forbid(unsafe_code)]
2+
#![deny(rust_2018_idioms)]
23

34
use bstr::BStr;
45

@@ -12,6 +13,7 @@ mod entry;
1213
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Default)]
1314
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
1415
pub struct Entry<'a> {
16+
#[cfg_attr(feature = "serde1", serde(borrow))]
1517
/// The name to map to.
1618
canonical_name: Option<&'a BStr>,
1719
/// The email map to.

0 commit comments

Comments
 (0)