Skip to content

Commit

Permalink
ron is no longer a feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Fogapod committed Feb 3, 2024
1 parent c28d3a6 commit a31fd7e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ criterion = { version = "0.4", features = ["html_reports"] }
default = ["deserialize"]

deserialize = ["dep:serde", "dep:typetag"]
ron = ["deserialize", "dep:ron"]
cli = ["dep:clap", "ron"]
cli = ["deserialize", "dep:clap", "dep:ron"]

[profile.dev]
opt-level = 3
Expand Down
36 changes: 23 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@
//!
//! Default replacments are:
//!
//! * [`replacement::Original`] does not replace (leaves original match as is)
//! * [`replacement::Literal`] puts given string
//! * [`replacement::Any`] selects random inner replacement with equal weights
//! * [`replacement::Weights`] selects random inner replacement based on relative weights
//! * [`replacement::Upper`] converts inner result to uppercase
//! * [`replacement::Lower`] converts inner result to lowercase
//! * [`replacement::Template`] enables templating for inner type
//! * [`replacement::NoTemplate`] disables templating for inner type
//! * [`replacement::MimicCase`] enables case mimicking for inner type
//! * [`replacement::NoMimicCase`] disables case mimicking for inner type
//! * [`replacement::Concat`] runs left and right inner branches and adds them together
//! * [`Original`] does not replace (leaves original match as is)
//! * [`Literal`] puts given string
//! * [`Any`] selects random inner replacement with equal weights
//! * [`Weights`] selects random inner replacement based on relative weights
//! * [`Upper`] converts inner result to uppercase
//! * [`Lower`] converts inner result to lowercase
//! * [`Template`] enables templating for inner type
//! * [`NoTemplate`] disables templating for inner type
//! * [`MimicCase`] enables case mimicking for inner type
//! * [`NoMimicCase`] disables case mimicking for inner type
//! * [`Concat`] runs left and right inner branches and adds them together
//!
//! # Implementing Replacement trait
//!
//! `StringCase` either uppercases or lowercases match depending of given boolean:
//!
//! ```rust
//! use sayit::{
//! replacement::{Replacement, ReplacementOptions},
//! replacement::Replacement,
//! Accent,
//! };
//!
Expand Down Expand Up @@ -110,10 +110,20 @@
//! Name | Description | Default?
//! ---|---|---
//! `deserialize` | enables deserialization for [`Replacement`] trait | yes
//! `ron` | enables ron format deserialization, requires `deserialize` | no
//! `cli` | required to run CLI tool | no
//!
//! [`Replacement`]: crate::replacement::Replacement
//! [`Original`]: crate::replacement::Original
//! [`Literal`]: crate::replacement::Literal
//! [`Any`]: crate::replacement::Any
//! [`Weights`]: crate::replacement::Weights
//! [`Upper`]: crate::replacement::Upper
//! [`Lower`]: crate::replacement::Lower
//! [`Template`]: crate::replacement::Template
//! [`NoTemplate`]: crate::replacement::NoTemplate
//! [`MimicCase`]: crate::replacement::MimicCase
//! [`NoMimicCase`]: crate::replacement::NoMimicCase
//! [`Concat`]: crate::replacement::Concat
mod accent;
mod intensity;
Expand Down

0 comments on commit a31fd7e

Please sign in to comment.