mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-25 13:21:00 +00:00
Don't pluralize when endswith s
This commit is contained in:
parent
a6690f59e4
commit
0e6b874d5d
6 changed files with 13 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams"
|
||||
description = "Activity Streams in Rust"
|
||||
version = "0.5.0-alpha.14"
|
||||
version = "0.5.0-alpha.15"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/activitystreams"
|
||||
|
@ -17,7 +17,7 @@ primitives = ["chrono", "mime", "serde", "thiserror", "url"]
|
|||
types = ["derive", "kinds", "primitives"]
|
||||
|
||||
[dependencies]
|
||||
activitystreams-derive = { version = "0.5.0-alpha.6", path = "activitystreams-derive", optional = true}
|
||||
activitystreams-derive = { version = "0.5.0-alpha.7", path = "activitystreams-derive", optional = true}
|
||||
chrono = { version = "0.4", optional = true }
|
||||
mime = { version = "0.3", optional = true }
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
|
|
|
@ -9,7 +9,7 @@ __A set of Traits and Types that make up the ActivityStreams and ActivityPub spe
|
|||
|
||||
First, add ActivityStreams to your dependencies
|
||||
```toml
|
||||
activitystreams = "0.5.0-alpha.14"
|
||||
activitystreams = "0.5.0-alpha.15"
|
||||
```
|
||||
|
||||
### Types
|
||||
|
@ -177,7 +177,7 @@ There are a number of features that can be disabled in this crate. By default, e
|
|||
enabled.
|
||||
|
||||
```toml
|
||||
activitystreams = { version = "0.5.0-alpha.14", default-features = "false", features = ["derive"] }
|
||||
activitystreams = { version = "0.5.0-alpha.15", default-features = "false", features = ["derive"] }
|
||||
```
|
||||
|
||||
| feature | what you get |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams-derive"
|
||||
description = "Derive macros for activitystreams"
|
||||
version = "0.5.0-alpha.6"
|
||||
version = "0.5.0-alpha.7"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix.dev@gmail.com>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/activitystreams"
|
||||
|
|
|
@ -10,7 +10,7 @@ Add the required crates to your `Cargo.toml`
|
|||
```toml
|
||||
# Cargo.toml
|
||||
|
||||
activitystreams = "0.5.0-alpha.14"
|
||||
activitystreams = "0.5.0-alpha.15"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
```
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
//!
|
||||
//! First, add `serde` and `activitystreams-derive` to your Cargo.toml
|
||||
//! ```toml
|
||||
//! activitystreams-derive = "0.5.0-alpha.6"
|
||||
//! # or activitystreams = "0.5.0-alpha.14"
|
||||
//! activitystreams-derive = "0.5.0-alpha.7"
|
||||
//! # or activitystreams = "0.5.0-alpha.15"
|
||||
//! serde = { version = "1.0", features = ["derive"] }
|
||||
//! ```
|
||||
//!
|
||||
|
@ -1537,8 +1537,10 @@ fn snakize(s: &str) -> String {
|
|||
}
|
||||
|
||||
fn pluralize(s: String) -> String {
|
||||
if s.ends_with('s') || s.ends_with('x') {
|
||||
if s.ends_with('x') {
|
||||
s + "es"
|
||||
} else if s.ends_with('s') {
|
||||
s
|
||||
} else {
|
||||
s + "s"
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
//!
|
||||
//! First, add ActivityStreams to your dependencies
|
||||
//! ```toml
|
||||
//! activitystreams = "0.5.0-alpha.14"
|
||||
//! activitystreams = "0.5.0-alpha.15"
|
||||
//! ```
|
||||
//!
|
||||
//! ### Types
|
||||
|
@ -209,7 +209,7 @@
|
|||
//! enabled.
|
||||
//!
|
||||
//! ```toml
|
||||
//! activitystreams = { version = "0.5.0-alpha.14", default-features = "false", features = ["derive"] }
|
||||
//! activitystreams = { version = "0.5.0-alpha.15", default-features = "false", features = ["derive"] }
|
||||
//! ```
|
||||
//!
|
||||
//! | feature | what you get |
|
||||
|
|
Loading…
Reference in a new issue